Linux Operations
Most production incidents are not exotic — they are common symptoms of the same OS: out of space, memory eaten, a process hung, a service that will not come up, clocks drifting. A DevOps engineer is valued not for knowing rare flags but for hitting the precise command under incident pressure and understanding what it shows.
This large topic is a map of everyday administration: from where things live and how to read disk and memory, through managing processes and services (systemd, cron), to network, time, and security (permissions, PAM, firewall, MAC). The key traps are named right in the layers — du versus df, SIGTERM versus SIGKILL, VIRT versus RES, a transient ip addr add versus a persistent config.
Topic map
- Filesystem layout & inodes — where logs and configs live and what an inode actually holds.
- Disk usage —
duversusdf, finding large directories, and the deleted-open-file discrepancy. - LVM — the PV/VG/LV layers and why a storage abstraction is useful.
- Memory inspection —
free -h, theRES/VIRT/SHRcolumns, andfreeversusavailable. - Swap & OOM — offloading pages to disk,
swapon/swapoff, and the OOM killer. - Process signals —
SIGTERMversusSIGKILLand the right order to stop a process. - systemd — the init system, PID 1, and managing services with
systemctl. - cron — the job scheduler and the
cron.allow/cron.denyaccess gate. - Package repositories — where APT/yum sources are configured and how to host your own.
- Network configuration — adding an IP and making it survive a reboot.
- Time synchronization — NTP,
chrony/ntpd, andtimedatectl. - Permissions & sudo —
/etc/sudoers,visudo, and the sticky bit. - PAM — pluggable authentication and the module stack.
- Security tools — the firewall (
iptables/firewalld) andMAC(SELinux/AppArmor).
Common traps
| Mistake | Consequence |
|---|---|
Confusing du (space used by files) with df (free space on a filesystem) | You diagnose the wrong thing; the deleted-open-file discrepancy stays a mystery |
Ranking processes by VIRT instead of RES | Overstated memory — virtual space is mostly unbacked |
Reaching for kill -9 first | No clean shutdown — lost or corrupted data |
Expecting ip addr add to survive a reboot | The address vanishes on reboot without a persistent config |
| Thinking the inode holds the filename | The name lives in the directory entry, not the inode |
| Treating the sticky bit as "read-only" protection | It actually restricts deletion, not writing |
| Treating SELinux/AppArmor as a firewall | It is MAC (process confinement), not a packet filter |
Editing /etc/sudoers without visudo | A syntax error locks out sudo entirely |
Interview relevance
The topic checks whether a candidate can be let near production without a babysitter. The interviewer gives short practical scenarios — "disk full", "out of memory", "service won't start" — and listens for whether you name the precise command and understand what stands behind it. The gap between "kill -9 fixes everything" and "SIGTERM first, SIGKILL for stuck ones" is immediately visible.
Typical checks:
- Disk and memory —
du/df,free,RESversusVIRT, thedu/dfdiscrepancy. - Processes and services — signals,
systemd/PID 1,systemctl restart/enable. - Configuration and security — persistent versus transient network config,
sudoers,PAM, firewall versusMAC.
Common wrong answer: "to free space you delete the big files" or "ip addr add persists on its own". Behind such answers is usually a lack of practice on live servers — which is exactly what this topic exposes.