Interview questions for Linux

LINUX is referred to as the most used operating system and is best known for its efficiency and fast performance. LINUX was first introduced by Linux Torvalds and is based on Linux Kernal.
It can run on different hardware platforms manufactured by HP, Intel, IBM etc.

1. What is Linux?

Linux is an operating system based on UNIX and was first introduced by Linus Torvalds. It is based on the Linux Kernel and can run on different hardware platforms manufactured by Intel, MIPS, HP, IBM, SPARC, and Motorola. Another popular element in Linux is its mascot, a penguin figure named Tux.

2. Can you tell us about the basic components of Linux?

Like any other typical operating system, Linux has an application program, GUIs, kernel and shells. The main advantage of using Linux as an operating system lies in the fact that it is open source and heavily customizable, which makes it equally ideal to use for seasoned professionals as well as newcomers.

3. What is BASH?

BASH is short for Bourne Again Shell. It was written by Steve Bourne as a replacement to the original Bourne Shell (represented by /bin/sh). It combines all the features from the original version of Bourne Shell, plus additional functions to make it easier and more convenient to use. It has since been adapted as the default shell for most systems running Linux.

4. Please draw a comparison between BASH and DOS?

DOS stands for Disk Operating System, while BASH is a contraction of Bourne Again Shell. A shell is simply a user interface meant for accessing the services offered by an operating system. It can either use a CLI, a GUI or both.
Following are the notable differences between DOS and BASH:
• Case Sensitivity – While DOS commands are not case sensitive, BASH commands are.
• Use of / and \ – In BASH, / acts as a directory separator and \ acts as an escape character. The use of / in DOS is to serve as a command argument delimiter and \ serves the role of directory separator.
• Naming Convention – DOS follows the naming convention under which a file must have an 8-character filename followed by a dot and 3-character extension. No naming convention is available for BASH.

5. Enlist the basic components of LINUX?

Linux operating system basically consists of 3 components. They are:
• Kernel: This is considered as the core part and is responsible for all major activities of the Linux operating system. Linux Kernel is considered as free and open-source software that is capable of managing hardware resources for the users. It consists of various modules and interacts directly with the underlying hardware.
• System Library: Most of the functionalities of the operating system are implemented by System Libraries. These act as a special function using which application programs accesses Kernel’s features.
• System Utility: These programs are responsible for performing specialized, individual-level tasks.

6. What is LILO?

LILO is a boot loader for Linux. It is used mainly to load the Linux operating system into main memory so that it can begin its operations.

7. Explain the virtual desktop?

Answer: When there are multiple windows available on the current desktop and there appears the problem of minimizing and maximizing windows or restoring all the current programs, there ‘Virtual Desktop’ serves as an alternative. It allows you to open one or more programs on a clean slate.
Virtual desktops are basically stored on a remote server and serve the following benefits:
• Cost savings as the resources can be shared and allocated as and when required.
• Resources and energy are more efficiently used.
• Data integrity is improved.
• Centralized administration.
• Fewer compatibility issues.

8. Please explain the virtual desktop and how to share a program across different virtual desktops under Linux?

Simply, a virtual desktop presents an alternative to minimizing and maximizing different windows. Instead of minimizing or restoring different programs, virtual desktops allow shuffling between desktops having different program windows.
Many times there is a need to share a program across different virtual desktops. For doing so, simply go to the upper left corner of the program window and click on the pushpin-like icon. It will pin the application, making it accessible across all the virtual desktops.

9. What is a swap space?

Swap space is a certain amount of space used by Linux to temporarily hold some programs that are running concurrently. This happens when RAM does not have enough memory to hold all programs that are executing.

10. Please explain case-sensitivity issues in Linux?

Sometimes entering the same command in Linux results in different outputs. This is typically attributed to case sensitivity. Because Linux is case sensitive, a command that previously produced the desired output might not do the same when executed again.
For example, the ls command is responsible for listing all files in the directory. However, entering LS, lS or Ls will display an error. Moreover, if there is a program that is named LS, then entering the LS command will execute it rather than listing all files in the directory.

11. What is Swap space?

Swap space is the amount of physical memory that is allocated for use by Linux to hold some concurrent running programs temporarily. This condition usually occurs when RAM does not have enough memory to support all concurrent running programs. This memory management involves the swapping of memory to and from physical storage.
There are different commands and tools available to manage the Swap space usage.

12. What is Linux pwd (print working directory) command?

Linux pwd command displays the whole path of the current location you are working in starting from the root ‘/’. Ex: to print the current working directory enter “$ pwd”.
It can be used for the below purposes:
• To find the full path of the current directory
• Store the full path
• Verify the absolute and physical path

13. What is command grouping and how does it work?

You can use parentheses to group commands. For example, if you want to send the current date and time along with the contents of a file named OUTPUT to a second file named MYDATES, you can apply command grouping as follows: (date cat OUTPUT) > MYDATES

leave your comment


Your email address will not be published. Required fields are marked *