Interview Questions and Answers in Linux: Part-2
Hello everyone, This is the second part of the interview questions and answers in Linux. Along with that will go through some examples also. I will create a series of questions and answers for beginners to advanced levels.
Linux:
- It's an open source.
- Free downloads and distribution/cheaper options.
- Lightweight with no need for high-end hardware.
- Users: Home users, developers etc.
- Ubuntu, Debian, Red-Hat, Solaris.
- installed on mobile phones, desktops, tablets video games consoles etc.
Unix:
- No source code for the general public.
- Not free, different prices for different variants.
- Need specific hardware, is comparatively costly.
- Mainly developed for mainframe servers and workstations except for OsX.
- AIX, HP-UX, BSD, Iris.
- Used internet servers, mainframes and high-end computers.
Kernel - Core part
System Library - Special functions using which application programs access Kernel features.
System Utility - Responsible for performing individuals and specialized functions.
- Users don't have root access.
- The virus can attack local files and folders only.
- All Linux accesses are recorded in log files.
- iptables to manage incoming and outgoing traffic.
- grep (Global Regular Expression Print)
- it is a search command; that uses pattern-based searches.
- Uses options and parameters specified along with the command line.
Ex: cat /etc/users/user.txt | grep -i 'basictechno'
the above command will print a line which contains only 'basictechno' as a string.
It's a live system admin's account.
Allows you to create and maintain user accounts and assign permissions.
The parent directory is represented by "/".
Contains all other directories and files.
The method of communication is insecure and The data is sent across the network without encryptions, in plain text format.
User - Owner/Creator of the file.
Group - All users in the group have the same permission.
Other - user with access to the file but not a part of that group.
Command: "chown"
Syntax: chown <newowner> <filename>
types of permissions for a file
- Read (r) - open and read
- Write (w) - modified content, renaming
- Execute (x) - executing file
Memory space comes into play when RAM doesn't have adequate memory to hold all executing programs.
Inactive memory pages are moved to swap space.
Soft mount case - if the NFS client fails to receive a response from NFS servers, it reports an error without waiting.
Hard mount case - NFS client repeatedly tries to contact the server until a response is received.