Top 62 Linux Interview QuestionsA list of top frequently asked Linux interview questions and answers are given below. Linux operating system internals1) What is Linux? Discuss its features.Linux is a UNIX based operating system. Linus Torvalds first introduced it. It is an open source operating system that was designed to provide free and a low-cost operating system for the computer users. Linux is an open-source Unix-like computer OS that directly manages the resources and hardware of a system, like storage, memory, and CPU, and handles the communication between hardware and software. First, it was published on 5 October 1991 by Linus Torvalds for systems and is considered faster and more secure than Windows. It's freely distributable and is basically established around Linux Kernel. Additionally, it can be installed in notebooks, computers, laptops, mobiles, etc. Linux operating system flavors include Gentoo, SUSE Linux, Debian, Ubuntu, etc. Some important aspects of the Linux operating system include:
2) What is the difference between UNIX and Linux?UNIX was originally started as a propriety operating system for Bell Laboratories, which later release their commercial version while Linux is a free, open source and a non-propriety operating system for the mass uses. 3) What is Linux Kernel? Discuss its functions.Linux Kernel is low-level system software. It is used to manage the hardware resources for the users. It provides an interface for user-level interaction. Linux kernel is the primary component of the Linux operating system. Simply, it is a resource manager that works as a bridge between software and hardware. Its primary role is to handle hardware resources and is generally used to offer an interface for interaction. A Linux kernel is the initial program that's loaded whenever a system starts. Also, it is called low-level system software. Its primary functions are as follows:
4) Is it legal to edit Linux Kernel?Yes. You can edit Linux Kernel because it is released under General Public License (GPL) and anyone can edit it. It comes under the category of free and open source software. 5) What is LILO?LILO is a boot loader for Linux. It is used to load the Linux operating system into the main memory to begin its operations. It is a bootloader that is used for loading Linux into memory and dawning the OS. Also, it is called a boat manager that offers a dual-boot of a system. It can work as either a secondary boot program or a master boot program that implements several functions, such as starting the kernel, loading memory, recognizing other supporting programs, and locating the kernel. We need to install a unique bootloader, i.e., LILO, if we wish to use Linux operating system because it permits Linux OS boot. 6) What is the advantage of open source?Open source facilitates you to distribute your software, including source codes freely to anyone who is interested. So, you can add features and even debug and correct errors of the source code. 7) What are the basic components of Linux?Just like other operating systems, Linux has all components like kernel, shells, GUIs, system utilities and application programs. Generally, Linux is composed of five components or elements, which are listed and explained as follows:
8) What is the advantage of Linux?Every aspect comes with additional features, and it provides a free downloading facility for all codes. 9) What do you mean by Linux Shell? Explain its types.Linux Shell is called the user interface available between the kernel and the user. It is used to execute communication and commands with Linux operating system. Linux shell takes human-readable commands as input and transforms them into a language that is kernel understandable. Different shell types are used on classic Linux systems, as mentioned below:
10) Name the Linux which is specially designed by the Sun Microsystems.Solaris is the Linux of Sun Microsystems. 11) Name the Linux loader.LILO is the Linux loader. 12) If you have saved a file in Linux. Later you wish to rename that file, what command is designed for it?The 'mv' command is used to rename a file. 13) Write about an internal command.The commands which are built in the shells are called as the internal commands. 14) Explain Process Id and INODE.
15) If the programmer wishes to execute an instruction at the specified time. Which command is used?The 'at' command is used for the same. 16) Name some Linux variants.Some of the Linux commands are:
17) What is Swap Space?Swap space is used to specify a space which is used by Linux to hold some concurrent running program temporarily. It is used when RAM does not have enough space to hold all programs that are executing. As its name implies, swap space is a space on the hard disk used when the RAM or physical memory amount is full. It's a replacement for physical memory. Its primary function is to replace disk space for memory when actual RAM doesn't have sufficient space to hold every program that is running, and more space is needed. In other words, it can be used as a RAM extension by Linux. 18) What is BASH?BASH is a short form of Bourne Again SHell. It was a replacement to the original Bourne shell, written by Steve Bourne. It is generally a command language interpreter. BASH was written for GNU OS by Brian Fox and can replace Bourne Shell. It is the same as Bourne Shell but contains some extra features like a command-line amendment that make it more convenient and easier to use. It's the default user shell on almost every Linux installation. Basically, it is a non-compiled and interpreted process that can also execute in the terminal window. Also, it is able to read commands in shell scripts. 19) What is the basic difference between BASH and DOS?
20) What is a root account?The root account is like a system administrator account. It provides you full control of the system. You can create and maintain user accounts, assign different permission for each account, etc. 21) What is GUI and CLI?GUI: GUI stands for Graphical User Interface. It is a human-computer interface that permits users to collaborate with electronic devices through visual indicators and graphical icons. The use of these graphical icons or elements makes it convenient for the user to collaborate with the system. It's visually intuitive and permits higher productivity. It uses the images and the icons which are clicked by the users to communicate with the system. It is more attractive and user-friendly because of the use of the images and icons. CLI: CLI stands for Command Line Interface. It is a command-line program that takes text as input to run the tasks of the OS. It permits users to enter declarative commands to give instructions to the system to perform operations. It needs less memory than other interfaces, and it doesn't need Windows because a low-resolution monitor can also be used. It is an interface that allows users to type declarative commands to instruct the computer to perform operations. 22) Which popular office suite is available free for both Microsoft and Linux?Open Office Suite is available free for both Microsoft and Linux. You can install it on both of them. 23) Suppose your company is recently switched from Microsoft to Linux and you have some MS Word document to save and work in Linux, what will you do?Install Open Office Suite on Linux. It facilitates you to work with Microsoft documents. 24) What is SMTP?SMTP stands for Simple Mail Transfer Protocol. It is an internet standard for mail transmission. 25) What is Samba? Why is it used?Samba service is used to connect Linux machines to Microsoft network resources by providing Microsoft SMB support. 26) What are the basic commands for user management?
27) What is the maximum length for a filename in Linux?255 characters. 28) Is Linux Operating system virus free?No, there is no operating system till date that is virus free, but Linux is known to have less number of viruses. 29) Which partition stores the system configuration files in Linux system?/stc partition. 30) Which command is used to uncompress gzip files?gunzip command is used to uncompress gzip files. 31) Why do developers use MD5 options on passwords?MD5 is an encryption method, so it is used to encrypt the passwords before saving. 32) What is a virtual desktop?The virtual desktop is used as an alternative to minimizing and maximizing different windows on the current desktop. Virtual desktop facilitates you to open one or more programs on a clean slate rather than minimizing or restoring all the needed programs. 33) What is the difference between soft and hard mounting points?In the soft mount, if the client fails to connect the server, it gives an error report and closes the connection whereas in the hard mount, if the client fails to access the server, the connection hangs; and once the system is up, it again accesses the server. 34) Does the Alt+Ctrl+Del key combination work in Linux?Yes, it works like windows. 35) What are the file permissions in Linux?There are 3 types of permissions in Linux OS that are given below:
36) What are the modes used in VI editor?Visual Editor or VI editor is a default text editor that comes with almost every Linux operating system. There are three different types of modes utilized in the VI editor, as mentioned below:
37) How to exit from vi editors?The following commands are used to exit from vi editors.
38) How to delete information from a file in vi?The following commands are used to delete information from vi editors.
39) How to create a new file or modify an existing file in vi?
40) What are the Linux user mode types?Two Linux user modes are available, which are as follows:
41) What are the Process States?Linux process is a kind of process that can be in several distinct states. The process comes in these states from start to end. In Linux, the process states are mentioned below:
42) What is the typical swap partition size in the Linux System?It should be double the amount of RAM or physical memory available in the system. 43) What is the name of the file that's used to mount file systems automatically?The fstab file is the file that's used to mount file systems automatically. 44) What do you mean by LVM, and why it's important?Logical Volume Management, or LVM, is a tool that offers the management of logical volume for the Linux kernel. It's simply being introduced to enable physical storage device management convenient. Also, it features allocating disks, resizing, mirroring, and striping logical volumes. Its primary benefits are enhanced abstraction, control, and flexibility. It permits extensible disk space management. It is needed to online resize the file system. The LVM partition size can be increased with the "lvextend" command and decreased with the "lvreduce" command in Linux. 45) Define the "/proc" file system.A proc file system is a virtual or pseudo file system that offers an interface to the data structure of the kernel. Generally, it contains useful details about processes that are currently running. Also, it can be used to modify a few kernel parameters during execution or runtime. 46) What are the daemons?Daemons are also called the background process. They are a long-running program of Linux that executes in the background. They don't have any controlling terminal; hence they execute in the background. Daemons are the process starts when the computer is bootstrapped and ends or terminates only when the computer is shut down. It's simply the form of increasing the base OS functionality. It provides many functions that aren't available in OS. 47) What is the name of the daemon that can control the print spooling process?The line printing daemon can control the print spooling process. 48) What do you mean by a Zombie Process?In Linux, a Zombie Process is also known as a dead or defunct process. It is a process that has completed the execution, but its access remains inside the process table. Usually, it happens because of insufficient correspondence between child and parent processes. This process appears for the child process due to the parent process requires reading the child process's status. This process is deleted from the process table once it is finished with the wait system call. 49) What is the difference between an anacron and a cron?
50) What do you mean by load average under Linux?As its name implies, load average is the system average loaded on Linux servers being measured over a given time. The Linux server's load average can be detected using "uptime" and "top" commands. Also, it is used to record the system resources. 51) What is the Shell Script?As its name implies, Shell Script is a script mainly written for the shell. The script describes the programming language being used to manage applications. It permits the execution of distinct commands entered inside the shell. Generally, it helps us to make complex programs, including functions, loops, and conditional statements. 52) What is the name of the first process initiated by the kernel, and what is the process id of it in Linux?"init" is the first process initiated by the kernel, and 1 is the process id of it. Linux Networking53) What are /etc/hosts and /etc/resolv.conf files in Linux?
54) What is Network bonding in Linux?Network bonding is also called NIC teaming. It is a kind of bonding that connects two or more network interfaces to a single interface. Usually, it improves redundancy and performance generally by increasing network bandwidth and throughput. 55) What are the types of network bonding?There are several network bonding modes which are mentioned as follows:
55) What are the default ports for squid, DHCP, SSH, FTP, SMTP, and DNS?Default ports for several services are below:
56) What is the difference between Hard and Soft links?
57) What are the three standard streams under Linux?In Linux, standard streams are I/O communication channels among a program and its environment. In the Linux environment, input and output are distributed around three standard streams, which are mentioned below:
Linux Commands58) Explain the netstat command.Network statics or netstat command is a networking tool for configuration and troubleshooting. It shows every network connection on the system. It offers a way to inspect whether several TCP/IP aspects are running and what connections are available. 59) Define the ping command.Packet Internet Groper aur ping command checks the connection status between the destination and source. In other words, this command checks whether a network is present and if the host is attainable. We can use the ping command to check both the IP address and name of the system. 60) Name the command used to see the default run level.The "/etc/inittab" command is used to see the default run level. 61) Name the command used to see the size of the directory or file.The "du" command is used to see the size of the directory or file. The disk usage or du command checks disk usage information of directories and files on a system. Also, it is used to show directory and file sizes in a recursive manner. 62) Name the command used to calculate the characters in a file.The "wc" command is used to calculate the characters in a file. The word count or wc command is used for counting the number of characters, words, and lines in any text file. |