You are on page 1of 3

Linux Interview Questions

1. Name some Linux distro’s?


a. Redhat Linux – Used as an enterprise operating system (most secure and raw bust
OS)
b. Centos Linux – Derived from red hat can be used for testing the operating system
and it is a free version.
c. Suse Linux – Used as an enterprise operating system a competitor for Red Hat.
d. Amazon Linux – Derived from red hat (all the operations that we do in red hat is
same here)

2. What is the difference between SUID and SETFACL?


a. SUID – is a special permission, that allows owner execute permission for all the
user’s in the operating system (Example: passwd command)
b. SETFACL – Is a special permission, which can be used to allocate a specific
permission for specific user or a group.

3. What is the advantage of using sticky bit permission?


a. When sticky bit permission is implemented, apart from owner of the folder no
other users can delete the files created by other owners.

4. How to check the block devices that are connected to Linux server?
a. lsblk – Is the command to display all the block devices connected to server.

5. Why we need to user LVM Volumes?


a. LVM provides the flexibility of resizing the drive when there is a demand.

6. Explain the Booting Process of Linux OS?


a. BIOS – Starts POST (power-on self-test) program which checks all H/W devices
connectivity.
b. Boot Strap - Locates and starts the boot loader Grub
c. Grub – Is new boot loader of Linux stands for Grand unified boot loader which
starts the kernel.
d. Kernel – Kernel starts and loads necessary drivers to support H/W devices and
also extracts INITRAMFS/INITRD image which will act as a temporary root file
system until the original file system is mounted.
e. INIT/SYSTEMD – Kernel starts SYSTEMD which is the first process that will started
in an OS. Which will start all the required services to support the operating
system functionality.
f. Targets – After systemd starts and turns on all other required services, other
partitions will get mounted and users will be able to login to server.

7. What is the command to check the free memory in Linux server?


a. Free –m command will display the memory statistics.
8. How to check the statistics of a mounted file systems in Linux?
a. Df -Th command will display all the mounted file system and its properties in
Linux.

9. What is the name of Kernel File?


a. Vmlinuz

10. What tool do you use to monitor the performance of the server?
a. Top – Utility displays the real time system performance of linux server which will
be easy to troubleshoot any load balancing related issues.

11. What is dmesg command is used for?


a. Dmesg – is a command which gives the log reports of all the H/W devices
activity, using this we can trace if there is any H/W issues especially like RAM,
HDD, or CPU issues.

12. How to terminate a process, what is the difference between SIG 15 and SIG 9?
a. Kill – command can be used to kill the processes using the appropriate signals.
b. Sig 15 – Will be used to terminate the process in a standard way.
c. Sig 9 – Will be used to terminate only the non-responding processes or
abnormally behaving processes.
d. Top – can also be used to kill the process by pressing the K button from top
menu and selecting the specific process ID and signal.

13. What tool you have used to install and manage the packages in Linux?
a. YUM – yellow dog update manager, which is a powerful tool to manage the
packages. It also eases the job by installing the dependencies automatically of a
package.
i. Yum can be used in – Redhat, centos, Amazon Linux, oracle Linux
b. APT – Tool used on debain platform’s
c. YAST / Zipper – Tool used in SUSE Linux.

14. How to check the network activity of service like sshd?


a. Netstat –pantl | grep sshd, command can be used to check the network activity
of any service.

15. What is the difference between Emergency Mode & Rescue Mode?
a. Emergency Mode – Allows to troubleshoot the booting issues of a linux system.
But the file system will be mounted on read only file system manually we have to
remount the filesystem to read-write.
b. Rescue Mode – Functions the same way how emergency mode do, but the only
difference here is in rescue mode the filesystem will be mounted read-write by
default. We don’t have to remount here.

16. How do you find errors in Linux?


a. For all types of messages we can check in - /var/log/messages
b. For H/W device specific error messages we can check in – dmesg command
c. For any selinux errors – we can check in - /var/log/audit/audit.log also in
/var/log/messages.

17. How do you rollback the packages to a previous version?


a. Yum history – command can be used to rollback or undo the changes.

You might also like