Linux Interview Questions

Diagnosing a slow or hung service — processes and signals, cgroup limits and OOM kills, file descriptors, the shell, networking, and which tool answers which question. Framed for engineers who operate services.

ProcessesPerformanceShellNetworkingsystemdAria-powered explanations
0 / 100 answered
0%
12 Easy63 Medium25 Hard

Showing 120 of 100

#1How do Linux file permissions work?

Easy
Filesystem

#2What is an inode and what does it tell you?

Medium
Filesystem

#3What is the difference between a hard link and a symbolic link?

Easy
Filesystem

#4How do you find what is filling up a disk?

Medium
Filesystem

#5What is the difference between /proc, /sys and /dev?

Medium
Filesystem

#6What happens when you run out of file descriptors?

Medium
Filesystem

#7How do you search for files and content effectively?

Easy
Filesystem

#8What is a mount and what does a bind mount do?

Medium
Filesystem

#9How do you manage log files so they do not fill the disk?

Medium
Filesystem

#10What is the difference between soft and hard ulimits?

Medium
Filesystem

#11What is the page cache and why does free memory look low?

Medium
Filesystem

#12How do you transfer and synchronise files between machines?

Easy
Filesystem

#13What is the difference between a filesystem and a block device?

Medium
Filesystem

#14What does fsync do and why do databases care?

Hard
Filesystem

#15What is the difference between SIGTERM, SIGKILL and SIGSTOP?

Medium
Processes

#16What are the process states and what does D state mean?

Medium
Processes

#17What is a zombie process and how do you get rid of one?

Medium
Processes

#18How do you find which process is using a port?

Easy
Processes

#19What does the load average actually measure?

Medium
Processes

#20How do you find which process is consuming CPU?

Medium
Processes

Showing 120 of 100

Ask Aria about Linux

Sign in to chat with Aria

All 100 Linux questions at a glance
  1. How do Linux file permissions work?(Easy)
  2. What is an inode and what does it tell you?(Medium)
  3. What is the difference between a hard link and a symbolic link?(Easy)
  4. How do you find what is filling up a disk?(Medium)
  5. What is the difference between /proc, /sys and /dev?(Medium)
  6. What happens when you run out of file descriptors?(Medium)
  7. How do you search for files and content effectively?(Easy)
  8. What is a mount and what does a bind mount do?(Medium)
  9. How do you manage log files so they do not fill the disk?(Medium)
  10. What is the difference between soft and hard ulimits?(Medium)
  11. What is the page cache and why does free memory look low?(Medium)
  12. How do you transfer and synchronise files between machines?(Easy)
  13. What is the difference between a filesystem and a block device?(Medium)
  14. What does fsync do and why do databases care?(Hard)
  15. What is the difference between SIGTERM, SIGKILL and SIGSTOP?(Medium)
  16. What are the process states and what does D state mean?(Medium)
  17. What is a zombie process and how do you get rid of one?(Medium)
  18. How do you find which process is using a port?(Easy)
  19. What does the load average actually measure?(Medium)
  20. How do you find which process is consuming CPU?(Medium)
  21. What does strace do and when should you avoid it?(Medium)
  22. What is the difference between a process and a thread on Linux?(Medium)
  23. How do you run a process that survives logout?(Easy)
  24. What is the OOM killer and how do you find out it acted?(Medium)
  25. What is nice and how does process priority work?(Medium)
  26. How do you inspect a running process without stopping it?(Medium)
  27. What is the difference between fork and exec?(Medium)
  28. Why does PID 1 matter in a container?(Hard)
  29. What is the difference between stdout and stderr, and how do you redirect them?(Easy)
  30. How do pipes work and what is the exit status of a pipeline?(Medium)
  31. What should every bash script start with?(Medium)
  32. Why must you quote shell variables?(Medium)
  33. When would you use awk, sed, cut and grep?(Medium)
  34. How do you analyse a log file from the command line?(Medium)
  35. What is the difference between single and double quotes in bash?(Easy)
  36. How do you handle command-line arguments in a script?(Medium)
  37. What is the difference between a login shell, an interactive shell, and a script?(Medium)
  38. How do you schedule recurring work?(Medium)
  39. What is the difference between && , || and ; in a shell?(Easy)
  40. How do you process a large file efficiently in shell?(Medium)
  41. What does xargs do and when do you need it?(Medium)
  42. How do you make a script idempotent and safe to re-run?(Medium)
  43. How do you test whether a service is reachable?(Easy)
  44. What does ss tell you and how do you read it?(Medium)
  45. What is the difference between connection refused and connection timeout?(Medium)
  46. How do you diagnose a DNS problem?(Medium)
  47. What is ephemeral port exhaustion and how do you spot it?(Hard)
  48. What is MTU and how does a mismatch manifest?(Hard)
  49. How do you capture and read network traffic?(Hard)
  50. How do you read a routing table and troubleshoot routing?(Medium)
  51. What is the difference between iptables and nftables, and what do you need to know?(Hard)
  52. What TCP kernel parameters matter for a busy server?(Hard)
  53. How do network namespaces make containers work?(Hard)
  54. What is a Unix domain socket and when is it better than TCP?(Medium)
  55. How do you troubleshoot a service that works from one machine but not another?(Medium)
  56. What does high retransmission rate indicate?(Hard)
  57. A server is slow. What do you check, in what order?(Medium)
  58. What does high iowait actually tell you?(Hard)
  59. How do you tell whether a system is swapping and why does it matter?(Medium)
  60. How do you interpret iostat output?(Hard)
  61. How do you find which process is doing the disk I/O?(Medium)
  62. What is the difference between RSS and virtual memory size?(Medium)
  63. How do you diagnose a process stuck at 100% CPU?(Hard)
  64. What is perf and what can you do with it?(Hard)
  65. What is eBPF and why does it matter for observability?(Hard)
  66. How do cgroups limit resources and what happens at the limit?(Hard)
  67. Why might a container be killed with exit code 137?(Medium)
  68. What is the difference between user time, system time and real time?(Medium)
  69. How do you find a memory leak on a Linux system?(Hard)
  70. What do you do when a machine is unresponsive?(Medium)
  71. How do you compare performance before and after a change?(Medium)
  72. What is the difference between throughput and latency, and why can improving one hurt the other?(Hard)
  73. What does systemd do and what is a unit?(Medium)
  74. What goes in a systemd service unit for a production service?(Medium)
  75. How do you read logs with journalctl?(Easy)
  76. A systemd service will not start. How do you debug it?(Medium)
  77. What is socket activation?(Hard)
  78. How do systemd timers compare to cron?(Medium)
  79. What is the difference between Requires, Wants and After?(Hard)
  80. How do you override a systemd unit without editing the original?(Medium)
  81. How do you make a service restart automatically but not loop forever?(Medium)
  82. How do you harden a systemd service?(Hard)
  83. What is LVM and why use it?(Medium)
  84. How do you add and mount a new disk?(Medium)
  85. What is the difference between ext4 and XFS?(Medium)
  86. What do the RAID levels mean and when do you use each?(Medium)
  87. How do you find what is causing high disk latency?(Hard)
  88. What is the difference between block, file and object storage?(Medium)
  89. How do you safely resize a filesystem?(Medium)
  90. What should you know about disk usage in containers?(Medium)
  91. How does sudo work and how should it be configured?(Medium)
  92. What is setuid and why is it dangerous?(Hard)
  93. What are Linux capabilities?(Hard)
  94. How should SSH be configured for a server?(Medium)
  95. What is SELinux or AppArmor and why do people disable it?(Hard)
  96. How do you keep a Linux server patched?(Medium)
  97. What should you check when investigating a possibly compromised machine?(Hard)
  98. What is the principle of least privilege in practice on Linux?(Medium)
  99. How do you handle secrets on a Linux server?(Medium)
  100. What Linux knowledge actually matters for a backend engineer?(Easy)