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
- IBM AIX
- Sun Solairs
- Mac OS X
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?
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?
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?
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.
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 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.
cd. Vi, vim and nano are editors which is useful in editing files, while cd command is used for changing directory.