linux interview questions
Image Source - Pixabay
Are you thinking of getting a job in Linux platform, but not sure how? Don’t worry, it’s a common question! To move ahead in your career in Linux development, here we have provided the collection of Top 20+ Linux Interview Questions and Answers asked by Top MNCs. We assure that we have compiled almost 95% of most important Linux Interview Questions and Answers that helps you in cracking your interview and achieve your dream career as Linux Developer.  

Linux Interview Questions and Answers

Question: Difference between Linux and Windows
FREE Need to purchase
open source OS Not open source OS
Can be customizable No customizations
high level security Cannot fight against virus and malware attacks
Primary partitionig and logical partitioning available to boot primary partitioning booting available only
Back Slash separates directories Forward slash separates directories
File names are case sensitive Not case sensitive while naming files
Question: Difference Between Linux and UNIX

UNIX – Only multinational companies and Fortune 500 Companies are allowed to use the UNIX copyright and name. The top MNCs such as IBM AIX, Sun Solaris, and HP-UX all are UNIX operating systems.

Linux is a UNIX clone. But if you consider Portable Operating System Interface (POSIX) then Linux can be the right choice.

Question: Define LILO

The abbreviation for LILO is Linux Loader and it is considered as the boot loader for Linux. LILO is used to load Linux into the memory and start the operating system. Also, LILO is easily customizable, that means, if the default configuration is wrong, it can be changed automatically. Config file for LILO is lilo.conf.

Question: What Are the Tasks Handled by LILO?

1. Locating the Linux kernel.
2. Identifying programs and loading them into the memory.
3. Starting Kernel.

Question: What Command You Use to Print a file “Draft” with 60 lines on a page?


The command used: pr -l60 draft

  • The recommended page length when using pr is 66 lines.
  • The -l option indicates a different length.
Question: Name the Service that You Should Disable on a Linux  Server

Finger Service – This should be disabled because a remote user can get the information about the system by using commands.

Question: What Are Sar and Where Sar Logs Stored?

Sar is used to collect, report and save the system activity information and also it serves to log and evaluate variety of information regarding system activity. Even more, Sar also allows retroactive analysis of the load values for various sub-systems (CPUs, memory, disks, interrupts, network interfaces and so forth) and limitation of problems.

Sar is located at /var/log/sa/sadd file, where dd indicates the current day.

Question: Explain the Basic Components of Linux

Linux Operating System consists of three basic components which are as below:-

  • Kernel: free and open source software that is responsible for handling hardware resources for the users.
  • System Library: System Library plays a vital role because application programs access Kernels feature using system library.
  • System Utility: System Utility performs specific and individual level tasks.
Question: What is Bash?

BASH for Bourne Again Shell. It is the UNIX shell for the GNU operating system. BASH is the language interpreter that helps you to enter your input, and thus you can retrieve information. In short, BASH is a program that will analyze the data entered by the user and execute the command accordingly and gives output.

Question: What is crontab?

Cron is a scheduler that executes the commands at a regular interval as per the specific date and time defined. If we have multiple users in Linux, then all the users can have their crontab separately. The crontabs files are saved at a particular location that is /var/spool/cron/crontabs.

The fields of Crontab are as follows:

<Minute><Hour><Day_of_the_Month><Month_of_the_Year><Day_of_the_Week><command/program to execute>

Question: Explain CLI?

The abbreviation for CLI is Command Line Interface. Here we have to provide information to the system, so it can function accordingly. When it comes to Linux operating system, CLI acts as an interface where the user can type the commands and the system completes the task.

Question: What is The Maximum Length for a File Name Allowed in Linux?

The maximum length for a file name recommended is 255 characters. And, most importantly, this character limit doesn’t include the pathname. So, the pathname and file name altogether surpasses the recommended character limit 255 characters.

Question: What Are Some of The Popular UNIX Operating Systems?

List below are few of the most used UNIX Operating Systems

  1. HP-UX
  2. IBM AIX
  3. Sun Solairs
  4. Mac OS X
  5. IRIX
Question: What Does Curl Command Do in Linux?

In Linux, curl command is used to test an application’s connectivity to an upstream service endpoint. And this command will be used to determine if the application can reach another service, like a database, or checking if your service is working normal.

Question:  What is the command to make a tape archive file of a /home directory and send it to the /dev/tape device?

The command is tar -cvf /dev/tape /home.

And the command –xvf is used to retrieve files from an archive.

Question: What Are the Different Bonding Methods Used in Linux

balance-rr or mode 0 – works on the round-robin policy  and used for fault tolerance and load balancing.

active-backup or mode 1 – works on the active-backup policy and it is also used for fault tolerance.

balance-xor or mode 2 – sets an exclusive or mode that means source MAC address is XOR’d with the destination address; it provides both fault tolerance and load balancing

broadcast or mode 3 – sets a broadcast mode to provide fault tolerance

802.3ad or mode 4 – This mode will create the aggregation groups, and all the groups will share the same speed.

balance-tlb or mode 5 – a transmit load balancing mode for fault tolerance and load balancing

balance-alb or mode 6 – sets an active load balancing to achieve fault tolerance and load balancing.

Question: Is It Legal To Edit Linux Kernel?

Yes, Kernel is released under General Public Licence (GPL), and anyone can edit Linux Kernel to the extent permitted under GPL. Linux Kernel comes under the category of Free and Open Source Software (FOSS).

Question: Is Linux Operating System Virus Free?

No! There is no virus free operating exist any Operating System on this earth! However Linux is known to have least number of Viruses, till date, yes even less than UNIX OS. Linux has had about 60-100 viruses listed till date. A rough estimate of UNIX viruses is between 85 -120 viruses reported till date.

Multiple Choice Linux Interview Questions With Detailed Answers

Question: What is the core of Linux Operating System?
  • Shell
  • Kernel
  • Command
  • Script
  • Terminal

Kernel is the core of Linux OS. Shell is a command Line Interpreter, Command is user Instruction to Computer, Script is collection of commands stored in a file and Terminal is a command Line Interface

Question: What Linus Torvalds Created?
  • Fedora
  • Slackware
  • Debian
  • Gentoo
  • Linux

Linus Torvalds created Linux, which is the kernel (heart) of all of the above OS and all other Linux OS.

Question: Torvalds, One of the most wrote Linux Kernel in C++ programming Language, do you agree?
  • Yes
  • No

No! Linux Kernel contains 12,020,528 Lines of codes out of which 2,151,595 Lines are comments. So remaining 9,868,933 lines are codes and out of 9,868,933 Lines of codes 7,896,318 are written in C Programming Language.

Question: Choose the odd one out.
  • HP-UX
  • AIX
  • OSX
  • Slackware
  • Solaris

Slackware! HP-UX, AIX, OSX, Solaris are developed by HP, IBM, APPLE, Oracle respectively and all are UNIX derived. Slackware is a Linux OS.

Question: Linux is which kind of Operating System?
  • Multi User
  • Multi-Tasking
  • Multi Process
  • All of the above
  • None of the above

All of the Above! Linux OS supports Multi User, Running a Number of Processes performing different tasks all at a time.

Question: Syntax of any Linux command is:

Syntax of Linux Command is Command [options] [arguments].

Question: Choose the odd one out.
  • Vi
  • vim
  • cd
  • nano

cd. Vi, vim and nano are editors which is useful in editing files, while cd command is used for changing directory.

That’s all for now! We hope that this collection of Linux Interview Questions and answers would be a great help for you! To keep a track of all Interview Questions and Answers, Interview Tips & Tricks, tuned and connected to!


Please enter your comment!
Please enter your name here