Introduction

Linux is an open-source Unix-like operating system-based family on the Linux kernel, and the OS kernel was first published on 17 September 1991 by Linus Torvalds. Typically, Linux is packaged as the Linux distribution, which contains the supporting libraries and system software and kernel, several of which are offered by the GNU Project. Several Linux distributions use the term “Linux” in the title, but the Free Software Foundation uses the “GNU/Linux” title to focus on the necessity of GNU software, causing a few controversies.

Famous Linux distributions are Ubuntu, Fedora Linux, and Debian, the latter of which is composed of several different modifications and distributions, including Xubuntu and Lubuntu. Commercial distributions are SUSE Linux Enterprise and Red Hat Enterprise Linux. Desktop distributions of Linux are windowing systems like Wayland or X11 and desktop environments like KDE Plasma and GNOME.

Dive into a rich repository of Linux Admin Interview Questions & Answers, designed to sharpen your skills and excel in Linux administration interviews. Covering a spectrum of topics, from system configuration to security, this resource offers comprehensive insights for both beginners and experienced professionals.

Linux Admin Interview Questions

Network Bonding is a process of combining more than two network interfaces to form a single network interface. It offers performance improvement and redundancy by increasing network throughput and bandwidth.

No need to worry if one interface is down or unplugged because the other will work. The behaviour of the bonded interface depends on the bonding method. 

Different modes of Linux network bonding :

  • Mode-0(balance-rr): It is a default mode and based on Round-Robin policy. It offers fault tolerance and load balancing features. It used round-robin fashion to transmit the packets.
  • Mode-1(active-backup): It is based on Active Backup policy and only one slave will act in the band and another one will act when the others fail in the band. It also provides fault tolerance.
  • Mode-2(balance-xor): It sets a xor mode between the source Mac address and destination Mac address to provide fault tolerance.
  • Mode-3(broadcast): It is based on broadcast policy and transmitted everything in the slave interface. It also provides fault tolerance and can be used only for a particular purpose.
  • Mode-4(802.3ad): It is a dynamic aggregation mode, it created aggregation groups which is having the same speed. It uses the transmit hashing method to select the slaves for outgoing traffic.
  • Mode-5(balance-tlb): The outgoing traffic is according to the current load on the slave, and the incoming traffic is received by the slave. It is called an adaptive transmit load balancing mode. 
  • Mode-6(balance-alb): It is an adaptive load balancing mode. It does not require any switch support. 

To display the default route and routing table, we use the following commands.

$ route-n

$ nestat-rn

$ ip

 

We have two commands to check which ports are in listening in Linux Server. Following are the two commands.

# netstat --listen
# netstat -l

 

lib/modules/kernel-version/, this directory stores all the information about the compiled drives under the Linux system. Using lsmod command also we can see the installed kernel modules. 

To change the default run level in Linux use the init command. 

To share a directory using NFS, first edit the configuration file and ‘/etc/exports’ and add an entry like directory name ‘/<directory-name>’. Now restart the NFS service.

Details mentioned below

Service

Port

SMTP

25

DNS

53

FTP

20(Data Transfer) 21(Connections Established)

DHCP

68(dhcp client), 67(DHCP server)

SSH

22

Squid

3128

Locking user account is done for the security purpose so that unauthorized users cannot log in. So, we have a few ways to lock the user account. Some of them are below. 

  1. Lock or disable the password using passwd command.
  2. Expire the user account using usermod command or chage command.
  3. Changing the shell using nologin command ( /sbin/nologin ).

LVM stands for Large Volume Management, it is a storage management device. Users can create, resize, and delete LVM partitions. It increases abstraction, flexibility, and control. LVM is used to gather existing storage devices into the group and allocate logical units. 

unmask stands for user file creation mode. When the user creates any file, it has default file permissions. So unmask will specify few restrictions to the newly created file (it controls the file permissions).

umask [-S] [mask]

If the unmask command invoked without any arguments, it means it will display the current mask. 

To set the unmask permanently, we have two types.

They are:

  • Ocotal representation.
  • Symbolic representation.

We have so many Linux Distributors, among them, we discuss a few important ones.

  • Linux Mint: It is stable and robust. Linux Mint uses mate desktop and cinnamon. 
  • Debian: It stands for robustness, stability, and a well-oiled release cycle. It is user-friendly. Debian version 8 will be replaced by version 9.
  • Ubuntu: It is available for both desktop and server editions and is based on Debian.  
  • openSUSE: It is a good choice for new users and existing users.
  • Manjaro: It gives a pleasant experience for new and experienced users.

We are many reasons, in that few important reasons are listed out. Following are

  • High Stability: It is very stable and does not lead to crashes, it runs fastly as it is when it installed first. 
  • Security: It is a dependable server, that offers high security to the user. Using Linux on your system it is easy to avoid viruses and malware. The attacker cannot change any changes in the system until the user logged in as the root user.
  • Easy to Operate: Linux is easy to operate and we can install it easily onto the system because all the variants of Linux have their own software repositories. You can update the system periodically with just a few clicks or you can set automatic updation.
  • Hardware Compatibility: Linux can use on any hardware, it doesn’t have any hardware restrictions. It uses efficiently all system resources.
  • Open Source: The source code is available as it is under Free and Open Source Software(FOSS).

Following are the features of the Linux Operating System

  • Portable: Software can work on different types of hardware in the same way. It can carry easily in pen drives and memory cards.
  • Open Source: Source code available for free, and its community-based development project. 
  • Multi-User: Multiple users can use ram, applications and run programs at the same time. 
  • Multiprogramming: Multiple programs or applications can run at the same time. 
  • Shell: It has a special interpreter program where you can execute programs and commands of the system. 
  • Security: It provides authentication, authorization, and encryption to provide security to the data. 

Difference between Bash and Dos

Bash

Dos

Commands are case sensitive

commands are not case sensitive

Backward slash(/) represents directories separator

‘/’ represents command arguments

Forward slash ‘’ represents escape character

‘’ represents directories separator

Does not follow conventions naming in files  

Follow naming convention in files

  • Internal Commands: Commands directly run by the shell are known as internal commands and there is no separate process to run the commands. 
  • External Commands: Commands which are run by the kernel are known as external commands and every single command has its own unique process id.

Categorized in: