Linux Interview questions

Linux Interview questions

The interviews for developers often include questions on the basics of the Linux and other Unix based operating systems. Others who have interviewed for various posts usually document these questions. The answers might vary from person to person but the concept remains the same and this can only be understood when the person is clear on the basics of Linux.

Linux is quite different from Windows but it has a wide acceptance in some fields. Since it is open source software operating system, Linux is basically free and is used as a cross-platform operating system, which can easily be installed in PCs, laptops, video game consoles and more. This is what opens up many applications for Linux and thus a demand for talented and knowledgeable professionals who are aware of the field they are working in. You will know a lot of the answers to the given questions if you have worked with the OS for a long time.

These questions and answers on Linux OS are sure to help you out in the interview by helping you understand the pattern of the questionnaire and the types of questions asked. So, here are the questions and their answers.

Download Linux Interview questions PDF

Linux Interview questions

Linux is free open source multi-user operating system that is built on Linux kernel. Linus Torvalds released the first version of Linux operating system on September 17, 1991.

Some Difference between Linux and Unix Operating System:

LinuxUnix
Linux is open source anyone can use it free of cost.  UNIX is copyrighted only big companies like IBM AIX and Sun Solaris and HP-UX use it
Linux is just a kernel.   Unix is a complete operating system
By default, Linux supports and use ext3 or ext4 file systemsUnix comes with jfs, gpfs (AIX), jfs, gpfs (HP-UX), jfs, gpfs (Solaris) filesystems
Linux Redhat Enterprise, Fedora Linux, Debian Linux, Suse Enterprise Linux, Ubuntu Linux are some popular Linux OS.   HP-UX, IBM AIX, Sun Solaris, Mac OS X are some Unix based operating systems
Linux is considered as most user-friendlyApple OS X is most popular UNIX operating system for desktop usage.
Specifying the exact location of a directory or file from any well-established directory, preferably the root directory is known as an absolute path. On the other hand, relative path specifies the location of the directory or file with reference to the current location or the present working directory (pwd). 
Samba is software suite with open source. It runs on Linux OS and Unix/Linux based platforms. It is a reimplementation of the Common Internet File System (CIFS) and the more central Server Message Block (SMB) protocol. It is the standard Windows interoperability suite, which means that the software is able to communicate the programs of Linux to the Windows clients just like a native application. 
There are many commands, which display the free or used memory on Linux. The easiest way to track memory usage on Linux is by using the ‘free’ command. Linux and other Unix based operating systems generally show less free memory as might be available. That is why Swap (a special type of memory) is available for use when the RAM is full. 
The NFS mount options basically define how a client should handle or face a server crash or fail. In case of the soft mount, the client can report an error without waiting for a response from the NFS server. But this could also result in data corruption or data loss too. On the other hand, in case of the hard mount, the NFS file system repeatedly contacts the server until it receives a response. Once it reaches the server, the program will continue execution from the same point where it was stuck during the server crash. 
SSH stands for Secure Shell, which is a protocol for securely logging onto remote systems. It is the most common and simple way to access the remote Linux based servers. In order to do this, you must own a domain name and IP address. 
When the physical memory runs short, the computer, or rather the operating system makes use of both, hardware and software to compensate for the shortage of physical memory. It transfers the data from RAM to the disk space. 
There are three basic components of Linux:
  • Kernel: This is the core part of the Linux OS. 
  • System Libraries: These are special programs, functions or methods. The application programs and system utilities access the features of the kernel. 
  • System utilities: These are programs, which are responsible for accomplishing specialized tasks at the individual level.
The shebang or bang line is the absolute path from the root to the Bash interpreter. In a text file, the program loader parses the text in the initial line following the shebang as an interpreter directive. 
The env command is a shell command, which can be used to print out a list of the existing environment variables, or for running another program in a custom environment without altering the current one.
The chmod command is an abbreviation for Change Mode. This command is extremely useful for changing the permission for Files and folders located in Linux/Unix. File/Directory permission, which is generally Write, Read or executable for any user, group or others.
CLI is short for Command Line Interface and it is a human-computer interface. It is usually in sharp contrast to the Graphic User Interface (GUI), which is also used widely. In case of Linux, the GUI is used as an external wrapper to the basic CLI. 
SSH is basically a network protocol, which is used to remotely access and manage any device distantly. The chief difference between SSH and Telnet is that SSH makes use of encryption, which implies that the entire data transmitted over a network is secure from snooping. Telnet is not as secure though. Like Telnet, a user who wants to access a remote device must install an SSH client.
Set is an inbuilt shell, which displays all the shell variables including the environment variables. 
The Linux Operating System uses reserved disk block in the hard drive to swap. This is known as Swap Partition as no other files can be traced in the swap partition. In case of Windows OS, the swap space or partition is called swap file or page file.