INTERVIEW PREP
Interview questions
570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.
Showing 16–20 of 20 questions
Learn Linux →16.Load average is 30 on an 8-core box but CPU is mostly idle. What do you check?Senior
Load counts tasks running AND in uninterruptible sleep (D state), usually waiting on disk or NFS. Check vmstat 1 (wa, b columns), iostat -x 1 for saturated devices, ps -eo state,pid,cmd | grep ^D for stuck tasks, and dmesg for storage errors.
17.How would you harden SSH on a new server?Senior
Key-only auth (PasswordAuthentication no), no root login (PermitRootLogin no), restrict users or groups (AllowGroups), keep it patched, limit exposure with a firewall or bastion/SSM, add fail2ban or rate limits, and audit logins. Change one thing at a time and keep a second session open while testing.
18.A server is slow. Walk through how you investigate.Senior
Start broad, then narrow: uptime for load, top/htop for CPU and memory, vmstat 1 for run queue, swap and I/O wait, iostat -xz 1 for disk, free -m for memory, ss -s for connections, and dmesg/journal for errors like OOM kills. Find which resource is saturated, then which process uses it.
19.What happens, step by step, when you type a command and press Enter?Senior
The shell reads the line, expands variables and globs, and looks up the command: alias, function, builtin, then each folder in PATH. For an external program it calls fork() to create a child and execve() to load the program; the parent waits and stores the exit code in $?.
20.How does the Linux OOM killer decide what to kill, and how do you protect a process?Senior
When memory runs out, the kernel picks the process with the highest oom_score, mostly based on memory use. You can lower a process's chance with oom_score_adj (systemd OOMScoreAdjust=). The real fix is right-sizing memory, limits in cgroups, and finding the leak.