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

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.
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. 
Shell variables are local to the region they are defined in and are only available in the current shell. On the other hand, the user defines the environment variables interactively or in a startup file. A local variable can be made available as an environment variable by using ‘export VARNAME’. 
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. 
<b>uname </b> is reporting command in Linux that is used to retrieve basic information about a computer’s hardware and software.

Synatax:  uname [options]

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. 
The nohup command is a POSIX command used to ignore the HUP signal. The HUP signal is, by standard, the way a terminal warns dependent processes of logout. 
Grep stands for global regulation expression point. The command-line utility, grep, is used for searching data sets in plain-text for lines that match an expression which is used regularly. 
Making the file immutable by associating the immutable bit attribute to it prohibits even the root user from deleting it. 
Here are some of the differences between Linux and windows:

Linux

  • Linux is open source; the complete source code for Linux is available.
  • Linux is the GPL-licensed operating system, you are free to modify that software and use and even republish or sell it.
  • Download once and install it on as many PC you want.
  • Online peer support from the community via forums and online search.

Windows

  • Source code for windows is not available.
  • You can modify or redistribute Window operating system.
  • In Windows, you are bounded to use one license in One PC only. If you have to install it on other PC you need another License.
  • Paid to help desk support.
A hard link is simply an additional name for an existing file on Linux Operating System. They can also be created for other hard links. 
An NS record is operated to give a subdomain to a set of name servers. Whenever a user delegates a domain to DNSimple, the TLD authorities automatically place NS records for that domain in the TLD name servers. 

The PTR record is basically used as a spam filter and is used to authenticate the incoming messages. An A record should always exist for the PTR records. 

CNAME stands for Canonical Name, which is what this record provides to an alias name. 

MX stands for Mail Exchanger and the MX record is a special type of resource record in the DNS (Domain Name System). It specifies a mail server, which is completely responsible for accepting the messages via email on behalf of the recipient’s domain. A preference value is used to prioritize the mail delivery in case of multiple servers. 

The SSL handshake enables the SSL client and the server to establish the secret keys with which they communicate. SSL or TLS makes use of the shared key for the symmetric encryption of messages, which is much faster than an asymmetric encryption.
The Linux boot files are the configuration files, which are accessed and called during the system booting operation. The usage of this /boot/directory is standardized in the File System Hierarchy as it holds all the files used in booting the system- it is the first file to be called during the system boot. It usually contains Linux kernel files or boot loader files. 
LILO comes from Linux Loader, which is a small program that manages dual boot and is, thus, also called as the boot loader. It was practically the default boot loader for quite a number of Linux distributions succeeding the fame achieved by loadlin. Although GRUB has grown increasingly popular recently, LILO and ELILO are still used widely.