>DevOps Interview KB

Linux Interview Questions

12 questions

Linux systems questions covering the command-line fluency and troubleshooting instincts DevOps and SRE roles assume as table stakes.

How would you build automated alerting specifically for the df/du divergence pattern, rather than relying on someone noticing it during an incident?

IntermediateLinuxPrometheus6 min

df says a server's disk is 100% full, but running du -sh on every top-level directory only adds up to a fraction of that. Where did the rest of the space go?

IntermediateLinux8 min

How would you find the same df/du phantom-disk-usage issue on a containerized workload, where the culprit process might be in a different mount namespace?

AdvancedLinuxDocker8 min

Why does Unix allow you to delete a file that's still open by a running process, instead of blocking the delete like some other operating systems do?

IntermediateLinux6 min

chmod 755 vs chmod 644 — what do these numbers actually mean, and how would you figure out the right mode for a new file without guessing?

BeginnerLinux6 min

A containerized process shows only 40% average CPU usage, well under its configured limit, but application metrics show frequent latency spikes correlating with CPU throttling events. How is this possible?

AdvancedLinuxKubernetes8 min

A server's load average shows 8.0 on a 4-core machine, but CPU usage in top only shows 20%. How can load be double the core count while CPU usage looks low?

IntermediateLinux7 min

A service takes 25 seconds to shut down gracefully, but your orchestrator sends SIGKILL after a 10-second grace period, causing corrupted in-progress writes on every deploy. How do you actually fix this?

IntermediateLinux7 min

A production process appears to be running (it's in the process list, consuming no CPU) but isn't responding to any requests. How would you use strace to figure out what it's actually doing?

AdvancedLinux8 min

A misbehaving service is stuck in a rapid restart loop, consuming CPU and flooding logs, because systemd keeps restarting it immediately after every crash. How would you configure this correctly?

IntermediateLinuxSystemd6 min

A service running fine for months suddenly throws 'Too many open files' errors under increased load. How do you fix it correctly, rather than just raising the limit blindly?

IntermediateLinux7 min

How does debugging a systemd timer failure differ from debugging the same issue in cron?

IntermediateLinuxSystemd7 min