Linux Interview Questions and Answers

Last updated on Mar 08, 2022
  • Share
Linux Interview Questions

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

Here in this article, we will be listing frequently asked Linux Interview Questions and Answers with the belief that they will be helpful for you to gain higher marks. Also, to let you know that this article has been written under the guidance of industry professionals and covered all the current competencies.

Q11. How do I get to a command prompt in Linux?
Answer

You can use the key combination Ctrl+Alt+T to open a command prompt in Linux.

Q12. How do I run a file in Linux?
Answer
  • 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.
Q13. How do I check hard drive space on Linux?
Answer

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%

/

Q14. What is Lilo how is it useful in Linux?
Answer
Q15. What is export Ld_library_path?
Answer

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.

Q16. What do you mean by ldconfig in Linux?
Answer

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
Q17. What is GUI in Linux?
Answer

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.

Q18. What is puppet used for in Linux?
Answer
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
Q19. How to enhance the security of password file in Linux?
Answer

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.

Q20. What is the use of a symbolic link in Linux?
Answer
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.

Reviewed and verified by Best Interview Question
Best Interview Question

With our 10+ experience in PHP, MySQL, React, Python & more our technical consulting firm has received the privilege of working with top projects, 100 and still counting. Our team of 25+ is skilled in...