Every Company prefers Linux operating system because of its security, open source operating system. Having a good knowledge of Linux increase your probability of cracking interview. Coding Tag provides you with the most expected 30 Linux interview questions to face most challenging Linux system administrator interview. Coding Tag assists you to occupy a special position in the IT company.
1) Who introduced Linux?
Linus Torvalds is considered as a father of Linux.
2) Features of Linux?
a) Linux refers to Open-Source operating system influenced by UNIX. Linux is more approved OS for mainframes, servers, embedded devices and mobile services
b) Linux supports Portability
c) Multi-user and multitask system with both CUI (Command User Interface) and GUI (Graphic User Interface).
d) Hierarchical filesystem
e) Multi programming system
f) Linux is simply a kernel and distribution of Linux had made it advantageous Operating System.
g) You can do modification in the source
3) Explain Term LILO?
LILO Stand for last in last out, Boot loader used to load Linux operating system into main memory to introduce its operations.
4) How can you eliminate ongoing process in Linux?
Every process has their unique process ID and to eliminate any process, Kill command can be used. If we want to eliminate all the processes at a moment, use kill 0 command.
5) Which command can you use to display the status of your process?
ps ux can be used to display the status of your process.
6) What is the significance of GNU project?
GNU is the outcome of free Software movement initiated by Richard Stallman. It gives birth to LINUX operating system. GNU project was designed to construct a UNIX-like operating system but it should be open source.
KERNEL+ GNU utilities = Operating System
7) What do you mean by Linux Kernel?
The kernel is the lowest level of easily replaceable software that is responsible for managing and interfacing hardware resources of our computer. It acts as the foundation of any operating system and translates the user's command into hardware understandable languages.
8) What do you mean by BUSH?
Abbreviation of BUSH is Bourne Again Shell. It acts as the advancement of the original shell with the addition of some functionality features for user-friendly. Currently BUSH has been becoming the default shell for all Linux Systems. BUSH help in ALIAS which is not possible in any shell.
For example, as we know that clear command can be used to clear the screen. We can do alias to avoid that lengthy process of writing clear every time to clear the screen. We can simply write c instead of clear by the command alias c=clear.
9) How can you display the types of Supported shells of Linux Operating System?
10) Name the command used to display default shell of the Linux?
Daemon refers to background running programs that start after the system is bootstrapped and eliminate after the shutdown of the system. These programs do not have any controlling terminal. Its main function is to listen to the service request and in the meantime to act on that request after service is done it is disconnected and wait for a further request. Daemons in Unix ends with d. Daemons provide services like shared resource and file system accessibility, server functionality.
12) What are the main Components of Linux Operating system?
This is the basic question of Linux system administrator interview that there are the three main components of Linux OS, which are described below:
Kernel: Kernel is the lowest level of easily replaceable software that is responsible for managing and interfacing hardware resources of our computer. It acts as the foundation of any operating system and translates the user's command into hardware understandable languages.
System Library: These are the specially designed programs or functions which help application or utilities to access the features of the kernel.
System Utilities: The execution of specialized Task is the main responsibility of the System utility.
13) Why is the vmstat used in Linux?
You can visualise the virtual Statistics with the help of vmstat -a command.
14) How to shrink or lessen the size of LVM partition?
This is the most frequent question asked in advanced Linux interview questions about advance shrinking tool i.e. logical volume manager. The following three actions are required to be completed in sequence to shrink volume.
umount/dev/hda2/dir1 to unmount the filesystem.
lvreduce -L 10G/dev/mapper/myvg-mylv
15) System Calls?
System calls are used to manage processes in Linux. Following are the lists of system calls:
16) Process ID?
Process ID can be named as pid act as a unique identification of every process running in the background or foreground of UNIX system.
17) Neat Command?
Neat command offers a Graphical interface to modify the network devices settings.
18) umask value?
umask is short of "User file creation mask" possesses mask settings to manage and determine the newly created files and directories permissions. It can also be used to determine default files permissions. Unmask value consists of 4 digits octal number and can be expressed with the use of octal and symbolic values.
19) Tee Command?
Tee command is used to simultaneously illustrate and store the output of any other command. Tee commands have two functions first is to read standard input and deliver it to standard output and the second thing is to copy the input into the specified file.
20) Stateless Linux Server?
The one copy of OS information can be managed rather than managing every machine independently. Linux stateless server is able to run multiple machines from similar OS metadata. Stateless Linux server uses LDAP protocol to snapshot the state of the system, Stores Snapshots, every machine's prototypes and home directories
21) Hidden files in Linux?
Files and directories prefixed with a dot are known as hidden file or configuration directories holding secure information.
22) What is the importance of virtualization in Linux?
Instead of storing in local pc, you can store user desktop environment in a remote server with the help of Virtual Desktop. Hyper-visor software is used to create the Virtual machine. Virtualization software separates the client and server and only internet connection is required for virtualization. Improved integrity and cost saving are the main benefits of virtualization.
23) Empty Directories in Linux?
The nameless base or empty directories Provides an attachment to all devices, file and other directories.
24) Which command can be used to delete all file without deleting directories itself?
Find command can be used if we first want to find specific directories and then delete all the files.
Rm command can be used if we want to delete one or more files.
25) Grep Command?
Grep command stands for globally search for regular expression is dependent on pattern-based-searching including parameters and options in the command. This is used to search specific string in a text file. With specific patterns, this grep filter searches a file and displays all the line matching that particular pattern. The search patterns are in the regular expression.
Syntax: grep [options] pattern [files]
For example, if we want to search gf from file test
grep gf test, where "gf" is the word we want to search and test is the file name.
26) What is the redirection in Linux?
Redirection work as a series, the output of one process act as the input of another process in the same command. Greater than operator ">" is used in the command to represent redirection and double redirection can be used to append.
Example of redirection cat file4 file5 > file6.txt
cat >> file4.txt
27) Functions of the inode in Linux?
In Linux, Inode refers to a data structure, to record all the metadata of files and Directories and contents are stored in data blocks. Inode number serves as an index number containing attributes like GID, UID,
permissions, file types, file deletion time etc.
28) How can we encrypt the password in a multi-user environment?
29) What are symbolic links?
Symbolic links are identical to the shortcuts created in windows operating system. The main benefit of symbolic links is instant access to the file. Softlinks are the special type of links that point to directories, files or programs but it does not contain data, data will be present in the target file only
30) Command used to create a Directories in Linux?
mkdir command is used to create directories.
Example: mkdir directory name