Top Linux interview questions and answers for system admin

Linux system admin interview questions and answers for beginners part1

In this tutorial, we will discuss the most frequently asked Linux system admin interview questions and answers for beginners. You can find the below list of Linux level 1 interview questions and answers.

Q1. What is the Linux and also explain it’s essential components?

Ans: Linux is an open-source OS (operating system). An operating system is a software that directly manages a system’s hardware and resources, like CPU, memory, and storage. The OS provides an interface between computer software and computer hardware.

Frequently you can hear this word, Linux Distro or Linux Distribution. In a complete name, you can say a Linux Distro is the full Operating System. Because, it’s come along with many other free software.

There are three main basic components of the Linux Operating System.

  • Kernel: The Linux kernel is the main component of a Linux operating system (OS) and it is the core interface between a computer’s hardware and its processes. It manages the computer hardware for the users.
  • System Library: System Library plays a vital role because application programs access the kernels feature using the system library.
  • System Utility: System Utility performs specific and individual level tasks.

Q2. How to check which CentOS version is installed on the server?

Ans: We can use the cat /etc/centos-release command. The output of this command will tell you the CentOS version.

Q3. How to check which Red Hat Enterprise Linux version is installed on the server?

Ans: We can use the cat /etc/redhat-release command. The output of this command will tell you the Redhat OS version.

Q4. What is a Terminal in Linux?

Ans: A terminal emulator is a program that allows the use of the terminal in a graphical environment.

Here are some free, commonly-used terminal emulators by operating system:

  • Linux: Terminal, KDE Konsole, XTerm, gnome-terminal, konsole, rxvt, kvt, nxterm, and eterm
  • Mac OS X: Terminal (default), iTerm 2
  • Windows: PuTTY

Q5. What is the Shell in Linux?

Ans: In simple words, a shell is a software that takes the command from your keyboard and passes it to the Operating System.

Q6. What are the common types of shells in Linux?

Ans: You can find the below list of the common shells in Linux.

  • sh – Bourne shell
  • bash – Bourne Again Shell
  • csh – C SHell
  • tcsh – enhanced C Shell
  • zsh – Z SHell
  • ksh – Korn SHell

Q7. What are the key features of the bash shell?

Ans: The bash is the default shell on many Linux distributions nowadays. The Bash stands for Bourne-Again Shell. You can find the below main features of the bash.

  • Command-line editing
  • Command auto-completion
  • Job Control
  • Unlimited size command history
  • Shell Functions and Aliases
  • Unlimited size Indexed arrays
  • Integer arithmetic in any base from two to sixty-four

Q8. How to check the uptime of a Linux server?

Ans: You can use the command uptime. It will show you the system up and running time. You can also use the w and top command to get this detail.

Q9. Which command is used to check the kernel version?

Ans: You can use the uname -r command.

Q10. How to check the IP address of LAN Card?

Ans: You can use the ip a and ip addr and ip address command. The output will be the same for all commands.

Note: In the older version of Linux, we use ifconfig command but in CentOS 7/8 and RHEL 7/8, It does not come preinstalled. If you want to use it then you have to install the net-tools package.

Q11. How To check the default gateway?

Ans: You can use the ip route show or ip route | grep default command.

Note: In the older version of Linux, we use route -n command but in CentOS 7/8 and RHEL 7/8, and the latest Debian based system, It does not come preinstalled. If you want to use it then you have to install the net-tools package.

Q12. How to check the hostname of a Linux based operating system?

Ans: You can use the hostname command. But after CentOS 7/8 and RHEL 7/8, you can use hostnamectl command to get the better result.

Q13. How can I change the hostname of the Linux system?

Ans: You can change the hostname using the hostnamectl command. This hostnamectl command will work with CentOS 7 and RHEL 7 and later and Ubuntu 17.04 and later. It works with systemd based distributions.

hostnamectl set-hostname type_host_name

Q14. What is the default uid & gid of the root user?

Ans: The default uid & gid of root user is 0.

Q15. What is the name of the first process in Linux?

Ans: The first process name in Linux that is started by the kernel is systemd with pid 1.

Q16. What is the process in Linux?

Ans: A process is a program in execution in memory. In other words, an instance of a program in memory. Any program executed creates a process.

Q17. How to change the password of the user from the command-line?

Ans: You can change the password of any user using the passwd command.

passwd username

Q18. How to check all the installed kernel modules?

Ans: You can use the lsmod command to check all the install kernel modules.

Q19. What is the bootloader in Linux?

Ans: The bootloader is a program that boots the operating system and decides from which kernel OS will boot.

Q20. What is Initrd in Linux?

Ans: Initrd stands for initial ramdisk, which contains the temporary root filesystem and necessary modules, which helps in mounting the real root filesystem in reading mode only.

Q21. How to install packages in RHEL & CentOS Linux?

Ans: You can use the rpm and yum command to install the packages in RHEL and CentOS Linux.

Q22. How to check the current runlevel of a Linux?

Ans: You can use different ways to get the runlevel. Below is the command list.

who -r
systemctl get-default

Q23. What is the soft link in Linux?

Ans: The soft link is the way to create short cuts in Linux. It is similar to the Windows short cut feature.

Q24. What is an inode value in Linux?

Ans: An inode is a data structure that stores various information about a file in Linux, such as the access mode (read, write, execute permissions), ownership, file type, file size, group, number of links, etc. Each inode is identified by an integer number. An inode is assigned to a file when it is created.

Q25. How to check an inode value in Linux?

Ans: You can use the ls -li command to check the inode value.

Q26. What is the difference between relative and absolute path?

Ans: The relative path refers to the path relative to the current path. But, An absolute path, on the other hand, refers to the exact path as referenced from the root directory.

Q27. What is the diff command in Linux?

Ans: The diff command is used to indicate the changes that are to be made to make the two files identical to each other.

Q28. What is the piping in Linux?

Ans: The piping, represented by the pipe character |, is used to combine two or more commands. So, the output of the first command serves as input the next command, and so on.

Q29.Why is it not advisable to use root as the default login in Linux?

Ans: The root account is very important, and with abusive usage, it can easily lead to system damage. So That’s the main reason.

Q30. What is pid in Linux?

Ans: The PID is short for Process ID. It is used primarily to identify every process that runs on the Linux system, whether it runs on the foreground or runs in the background. So, every PID is considered unique.


In this tutorial, you learned about top questions that are asked in an interview for Linux beginners. So, If you have any suggestions or you want to add any questions, please leave a message along with an issue in the comment section— Linux interview questions and answers.

Also, you can read further,

Leave a Reply

Your email address will not be published.