Linux Interview Questions and Answers – Part 1

Linux Interview Questions - Part 1
Linux Interview Questions – Part 1

Hi guys, today I thought of sharing something that really helps you to crack the interviews. Now a days interview panelists are started asking questions on real / live environment. Lets stick to the topic, I will share you the questions, along with the answers and the links to topics so that you have no need to google it.

Caution: The following questions are shared purely on personal, does not mean that these questions reflect the actual interview.

1. Tell me about your daily activities?

Explain what you do everyday, like.

1. Your first work on shift start
2. Explain them, if you analyze any logs or events
3. Explain them, what do you do with that events.
4. Explain them, If you implement any change requests
6. Explain them about ticketing activities.

2. What are the fields in fstab?

There are seven fields in /etc/fstab

DeviceFile                                   MountPoint      FSType       Options       Kdump     FSCK
/dev/mapper/vg01-lvol02           /home             ext4            defaults          1             2

3. What is kdump?

Kernel Dump is a program used to capture the system dump in the event of kernel crashes, kdump reserves a small portion of memory for the second kernel called crash kernel. This crash kernel is used to capture the system dump whenever the system crashes, these system dumps can be used to analyze issue and fix it.

4. What is debugging in Linux?

RHEL / CentOS comes with the Gnu debugger (GDB), it is a powerful tool, lets you to view internal structure of a program, print out variable values, set breakpoints and single step through source code. GDB helps you to fix the problems in program code. More.

5. What is 2& 1 in fsck field at fstab?

A number indicating the order in which the fsck will check the devices for errors at boot time.

1 – For the root filesystem.

2 –  Filesystems will be checked after the root filesystem.

6. Whar are the fields in /etc/exports file?

This file contains a list of shares that are exported to remote hosts and specifies options.

<export> <host1>(<options>)



/exported/directory – Directory that you want to export to remote hosts. – remote host

(rw,sync) – Options (Like permissions)

Get all details here.

7. Explain the fields of Crontab?

 .—————- minute (0 – 59)
 |   .————- hour (0 – 23)
 |  |  .———- day of month (1 – 31)
 |  |  |  .——- month (1 – 12) OR jan,feb,mar,apr …
 |  |  |  |  .—- day of week (0 – 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
 |  |  |  |  |
 *  *  *  *  * user-name  command to be executed

8. What are the things you would check incase the Linux VM faces performance issue in VMware environment?

You can go through the VMware performance guide.

9. How will you troubleshoot, if the particular service is not accessible?

Server Side:

1. Check the process of the service.

# ps -ef | grep <servicename>

2. Check the IP tables to know whether service is allowed for client machines to access.

# iptables -L

3. Check whether the service is listening on all adaptor / port

# netstat-antup | grep -i <portnumber>

4. Check for SELinux audit logs.

# cat /var/log/audit/audit.log

Client Side:

1. Make sure the client machine is allowed to access service port through hardware firewall.

2. You can also check whether the client machine is allowed to access the port using telnet command.

# telnet <port number>

You should get a response for above command, like below.

Connected to
Escape character is '^]'.

10. Explain yum configuration?

Get a more details here.

11. httpd package is not installed, but the service is running? How?

This is a tricky question, Apache packages may be compiled from source.

12. What are the ways to install packages in Linux?

We can install packages in Linux using three ways, rpm, yum and using tar-ball.

13. How to solve the performance issues in Linux?

You can use below tools to troubleshoot the performance issue in Linux,

  • top
  • sar
  • vmstat
  • iostat
  • free

14. Critical / big issue’s faced in Linux.

You can share some details such as kernel panic’s, cluster issue’s, disk or LVM corruptions and the biggest problems you faced in production environment.

More to come, stay tuned.


Share This Post