Linux interview questions and answers 👇

  1. Linux Interview Questions


Linux Interview Questions

1.

What is Kernel?

The Linux kernel is the main component of a Linux operating system (OS) and is the core interface between a computer’s hardware and its processes. It communicates between the 2, managing resources as efficiently as possible.

2.

What is LILO?

LILO stands for Linux Loader that is used to load Linux into memory. It can boot operating systems from floppy disks, hard disks, and it does not depend on a specific file system. Lilo handles some tasks such as locate the kernel, identify other supporting programs, load memory and starts the kernel.

3.

Explain root account.

Root is the superuser account in Unix and Linux. It is a user account for administrative purposes, and typically has the highest access rights on the system.

Usually, the root user account is called root.

4.

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.

5.

What is CLI?

CLI stands for Command Line Interface. It is a way for humans to interact with computers and is also known as the Command-line user interface. It relies on textual request and response transaction process where user types declarative commands to instruct the computer to perform operations.

6.

What is Cron?

Cron is a job scheduling utility present in Unix like systems. The crond daemon enables cron functionality and runs in background. The cron reads the crontab (cron tables) for running predefined scripts.

7.

What is a Shell script?

A shell script is a text file that contains a sequence of commands for a UNIX-based operating system. It is called a shell script because it combines a sequence of commands, that would otherwise have to be typed into the keyboard one at a time, into a single script.

8.

What is Stateless Linux server?

A stateless Linux server is a centralized server in which no state exists on the single workstations. There may be scenarios when a state of a partilcuar system is meaningful (A snap shot is taken then) and the user wants all the other machines to be in that state.

9.

What is Redirection?

Redirection is a feature in Linux such that when executing a command, you can change the standard input/output devices. The basic workflow of any Linux command is that it takes an input and give an output.

  • The standard input (stdin) device is the keyboard.
  • The standard output (stdout) device is the screen.

With redirection, the above standard input/output can be changed.

10.

What are grep commands?

Grep is a Linux / Unix command-line tool used to search for a string of characters in a specified file. The text search pattern is called a regular expression. When it finds a match, it prints the line with the result. The grep command is handy when searching through large log files.

11.

What is nslookup?

nslookup is a command-line administrative tool for testing and troubleshooting DNS servers (Domain Name Server). It is used to query specific DNS resource records (RR) as well.

12.

What is Traceroute?

traceroute command in Linux prints the route that a packet takes to reach the host. This command is useful when you want to know about the route and about all the hops that a packet takes.

13.

What is ifconfig?

ifconfig stands for "interface configuration." It is used to view and change the configuration of the network interfaces on your system.

14.

What is inode?

The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block locations of the object's data.

15.

What is a hard mount?

A Hard mount is generally used for block resources like a local disk or SAN. When a NFS filesystem mount is a Hard mount, an NFS request affecting any part of the mounted resource is issued repeatedly until the request is satisfied (for example, the server crashes and comes back up later).

16.

What are the file permissions in Linux?

In Linux, each file or directory has three basic permission types:

  • read: The Read permission refers to a user’s capability to read the contents of the file.
  • write: The Write permissions refer to a user’s capability to write or modify a file or directory.
  • execute: The Execute permission affects a user’s capability to execute a file or view the contents of a directory.
17.

What is LVM?

LVM stands for Logical Volume Management. It is a system of managing logical volumes, or filesystems, that is much more advanced and flexible than the traditional method of partitioning a disk into one or more segments and formatting that partition with a filesystem.

18.

What is Zombie process state?

A zombie process is a process whose execution is completed but it still has an entry in the process table. Zombie processes usually occur for child processes, as the parent process still needs to read its child’s exit status.

19.

What is swapping?

Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory.

20.

What are daemons?

A daemon is a service process that runs in the background and supervises the system or provides functionality to other processes.

21.

What is PWD command?

The pwd Linux command prints the current working directory path, starting from the root ( / ). Use the pwd command to find your way in the Linux file system structure maze or to pass the working directory in a Bash script.

22.

What is hypervisor?

A hypervisor is software that creates and runs virtual machines (VMs). A hypervisor, sometimes called a virtual machine monitor (VMM), isolates the hypervisor operating system and resources from the virtual machines and enables the creation and management of those VMs.

23.

What is TCP?

Transmission Control Protocol (TCP) is a standard that defines how to establish and maintain a network conversation by which applications can exchange data.

24.

What is a run level?

A runlevel is one of the modes that a Unix-based, dedicated server or a VPS server OS will run on. Each runlevel has a certain number of services stopped or started, giving the user control over the behavior of the machine.