‹ Interview

Linux Interview Questions

1 test · 10 questions
Browse all 10 questions ›
Your progress

Study guides

About these Linux questions

Linux sits underneath nearly every server, container and cloud instance, so interviews for system administrator, DevOps, SRE, platform and backend roles almost always include a round of Linux troubleshooting. The questions there are rarely "what does this flag do". They sound more like a pager alert: a process that won't die, a disk that is full while df says it isn't, a server with a huge load average and idle CPUs. These questions are written in that style.

They also cover the operating-system knowledge that Linux certifications and the Kubernetes exams take for granted. If you are preparing for something like the CKA, where you work on Linux nodes under time pressure, the material here is the ground you will be standing on.

What the questions cover

  • Processes and signals. The difference between SIGTERM and SIGKILL, why a process can ignore one but not the other, and why zombie processes can't be killed at all: their parent has to reap them.
  • Permissions. How the sticky bit lets everyone write to a shared directory while only the owner can delete or rename their own files.
  • Filesystems and storage. Running out of inodes while plenty of space is free, and what actually happens to hard links and symbolic links when the original file is removed.
  • systemd and services. Why editing a unit file needs systemctl daemon-reload before a restart picks up the change.
  • Shell scripting. How a pipeline's exit status works, why set -e alone misses a failure early in a pipeline, and what pipefail changes.
  • Networking. Finding which process is listening on a port with ss.
  • Performance, load and memory. Why load average counts processes stuck in uninterruptible I/O as well as those using CPU, so a hung NFS mount can push it far above the core count.
  • Scheduling and automation. Why a script that works in your terminal fails under cron, which runs it with a minimal environment and none of your shell start-up files.

How to use them

There is one practice test of 10 questions, mixing easy, medium and hard. Each explanation says why the answer is right and why each other option is wrong, and links to the man page or documentation it relies on.

  • Use a throwaway virtual machine or container and reproduce what you can. Creating a hard link, filling a small filesystem with empty files, or writing a script that traps SIGTERM takes minutes.
  • Learn to read process states in ps and top. Knowing what S, D and Z mean answers several of these questions on its own.
  • Read the wrong options as carefully as the right one. Many are the first thing someone tries under pressure, like kill -9 on a zombie, and an interviewer wants to hear why it won't help.
  • Get used to the man pages. man 7 signal, man 5 crontab and man 1 bash hold most of the detail these questions test, and they are on every machine you will be asked to fix.

These questions are original, written from the Linux man pages and the systemd documentation. They are not taken from any real interview or exam.