All of us, who usually use a laptop and desktops, are aware of the term operating system(OS). OS manages all the resources of hardware of systems and enables the best communication between software and your computer’s hardware. The best feature to define OS is software can work without this like Window7, Windows8, MAC, Windows XP; Linux is also a type of operating system.

Linux has stood as the best used operating system with its features like the best efficiency and fast performance. It can run on different hardware like Intel, IBM and Manufactured Hp, etc. In this article, we are going to discuss some of the best ​Linux interview questions:

1) What is Linux?

A) Linux is an open-source of operating system based on Unix. Linux was first introduced by Linus Torvalds. It gives high efficiency, most of the people choose Linux rather than Windows or iOS because of its low cost.

2) What are the Basic Components of Linux?

A) Linux has the following 4 basic components:

  • Kernal- It is the core part of the Linux operating system and is responsible for all the activities. It manages the hardware.
  • Shell- Shell is a Linux interpreter that is used to execute the commands.
  • System Utilities- These are software functions used to perform individual and specialized operations.
  • System Library- This acts as the best function which accesses the kernel’s operations. Most of the operations in OS was done here.

3) What is the GUI?

A) GUI is nothing but the graphical user interface, which is another way to interact with the system. Unlike CPI, GUI has images, buttons, text-boxes and because of these features, GUI has the interaction action to users.

4) What are the features of Linux?

Benefits

A) Here is a list of features performed by Linux:

  • It is a multi-tasker and multifunctional as it performs tasks simultaneously.
  • Linux kernel and applications can run on any hardware platforms.
  • It provides security services like authentication, authorization, and encryption.
  • It is very consumer friendly because of efficient accuracy and low cost.
  • It has its own applications that are used for installation and download and it has customized Keywords.
  • Linux supports multi-user to access the same system resources but by different Terminals for operation.

5) Explain LILO?

A) LILO stands for Linux Loader, it is a boot loader that loads an operating system into the main memory for starting its execution. A boot loader is a small program which manages dual boot. The advantage of LILO is it allows the fast boot up of Linux when installing Master Boot Record (MBR).

6) What is CLI?

A) CLI stands for Command Line Interface. It is a process of interaction with computers, where textual base commands are given to instruct operations. It relies on the textual request and response transaction process.

7) What is meant by Swap space?

A) Swap space is an additional space used by Linux to hold temporarily the currently running programs where RAM does not have sufficient memory to hold programs. Suppose if you run a program it resides in RAM, if more programs are running then RAM is not able to receive programs, so here a memory management process is done called swap space. There are different commands and tools used to manage swap space.

8) Explain 3 kinds of permissions by Linux?

linux

A) Every file and dictionary in Linux is assigned by 3 owners which are the User Group and the Others. The certain permissions defined for 3 owners are listed below:

  • Read: This permission allows you to open and read files as much as you can and list the content of the directory.
  • Write: This permission allows adding, reading and removing files in the directory. It allows you to modify the content in files.
  • Execute: User can run and set files in the dictionary. The user needs permission to run a file on the dictionary.

9) How to change permissions in the file or directory?

A) We can change the permission in a file or directory by using the chmod command.it has 2 types of modes

1. Symbolic Mode
2. Absolute Mode

Symbolic mode- We can change permissions by using symbolic mode as
$chmod<target>(+/-/=)<permission><filename>
Here <permossions> can be read,written and executed
And <target> can be user, group, other and all. “+” is used to adding permission. “-” is used to removing
permission. “=” is used to set permission.

The absolute mode-The formal syntax which is used change permission is
$chmod<permission>filename

10) What are Linux commands?

A) There are some important Linux commands were listed below

  • cd cd- Change directory as the name suggest allowing the user to change directory.
    Syntax:$ cd <path to new directory>
  • mkdir​- Make a directory allows the user to create a directory.
    Syntax:$ mkdir <name of a new directory>
  • rmdir rmdir-removes the directory or deletes the directory.
    Syntax-$ rmdir < name of the directory>
  • ls ls- lt lists all the files and directories currently working.
    Syntax:$ ls
  • pwd pwd-path of directory-It shows the path of the current directory.
    Syntax: $ pwd

11) What is a Latch?

latch

A) The latch is a temporary control storage device controlled by signals with timings which can be either 0 or 1. The latch can store one bit of data as long as it powers on. It has 2 outputs as high output-1 and lows output-2, which is mainly used to store information.

12) Show different modes when using vi editor?

A) There are 3 types of modes available in vi editors, as shown below

  • Command mode/Regular Mode.
  • Insertion mode/Edit Mode.
  • Ex Mode/Replacement Mode.

13) Explain Command grouping in Linux?

A) Command grouping is usually done by using braces” ()” or parenthesis”{}”.
When commands are placed within braces, then they executed as a shell.
Eg:(list)
when commands are placed within parenthesis, then they are executed as a subshell.
Eg:{list}

14) Explain some Linux file content commands?

A) There are many commands used to look up at the content of files. Some of them are listed below:

  • Head- This command is used to display the begging of the file.
  • Tail- This command shows the end most part of the file.
  • More- Displays the content in a pager form to understand easily to the users and it is used to view the text on the terminal window on the page or screen at a time.
  • Less- This commands used to view the information in a pager form and allow backward and a single line movement.
  • Cat- Concatenate files and print on standard output.

15) Show the process states in Linux?

process

A) Some of the processing states in Linux are listed under, they are:

  • Ready- The process is completed and ready to run.
  • Running- The process is being executed.
  • Terminated or completed- Process completes execution and is terminated by the operating system.
  • Wait or Blocked- Process is waiting for input from the user.
  • Zombie- Process terminates but still information exists.