Linux Interview Questions and Answers
A genuinely free and open source operating system, Linux is one of the most liked operating systems. It was designed keeping in mind the Unix compatibility. Read our detailed Linux interview questions to know more about the features and commands of Linux. Usually, it is called as the clone of Unix. Linux was developed by Linus Torvalds. While working on the Unix OS, he felt the need to improve Unix, but the designers of Unix rejected his suggestions. Hence, he founded the Linux in 1991 as a kernel first, which was later launched as a full-fledged OS.
Most Frequently Asked Linux Interview Questions
You can use the key combination Ctrl+Alt+T
to open a command prompt in Linux.
- Open the command prompt using Ctrl+Alt+T
- If your file does not have to execute permission, add the same chmod +x /root/home/your file.sh
- Run the script by typing /root/home/your file.sh and press enter.
Use df [options] [devices] to check hard drive space.
Example –
df -h /test/tmp gives output as
Filesystem |
Inodes |
IUsed |
IFree |
IUse% |
Mounted On |
/test/tmp |
453K |
23 |
433 |
1% |
/ |
It is an environment variable that contains a list of paths that are used to resolve the library dependencies at run-time (dynamic libraries). This path is checked before the standard paths /lib or /usr/lib.
Idconfig is a command that creates the required links and cache to the most recently shared libraries that are present in the directories specified in the
- command line,
- the file /etc/ld.so.conf,
- the trusted directories /lib and /usr/lib
Graphical User Interface or GUI makes it easier for a Linux user to execute programs via a desktop, similar to Windows. The desktops in Linux are KDE, Java, GNOME.
Puppet is a Configuration Management tool. It is used to
- Deploy, configure and manage servers,
- Define and monitor unique configurations for each host
- Scale-up and scale-down machines dynamically
- Provide control over configured devices to propagate changes in a centralized manner
For enhanced security, a shadow copy of the password file is made, which stores hashed passwords of all the users. The hashed password is a long string of characters, generated based on the hashing method used.
Read further for more questions on security in our list of Linux interview questions.
Symbolic link :-
- links the libraries
- ensures that the files are in their place without the original being copied or moved.
There are 3 main components in Linux
- Kernel, which communicates with the users and the underlying hardware;
- System library, which is a collection of functions and programs that contain almost all the functionalities of an operating system. Users can access the kernel’s features using these library functions;
- System utility, which is a set of programs that do individual, specialized tasks
Check out all the Linux interview questions to understand how Linux is a more improved version of Unix.
Advantages of Linux
- Linux is open source. Hence there are several distributions available to the end user. Example – Ubuntu, Mint.
- By making the code available to everyone, security issues are caught by experts before the versions are released to the public, hence offering higher security.
- Linux can be installed on any hardware without any hassle.
- Highly customizable and flexible because of the availability of source code.
- Provides good networking support using many commands. (Read more about this in our set of Linux interview questions)
- Has good support and documentation.
Latest version
The latest version of Linux is Debian 9.3 released on December 9, 2017.