Level 2 — Intermediate: troubleshooting · wrap-up
Cheat sheet & self-check
23 questions across 6 lessons. Each answer links back to the lesson it came from.
Pick an answer to see if you got it, and why.
Q1. You edited a unit file in /etc/systemd/system/. What must you run before restarting the service?
Show answer
B. systemd caches unit definitions. daemon-reload makes it read your changes; otherwise it keeps using the old definition.
From lesson 07 · systemd & journald in depthQ2. Why use 'systemctl edit' instead of editing /usr/lib/systemd/system/nginx.service?
Show answer
B. Vendor units live in /usr/lib. Your changes belong in /etc as overrides or drop-ins, which take precedence.
From lesson 07 · systemd & journald in depthQ3. What does Restart=on-failure do?
Show answer
B. systemd supervises the process. Combined with RestartSec=, it brings crashed services back automatically, which is the same idea as a Kubernetes restart policy.
From lesson 07 · systemd & journald in depthQ4. How do you see error messages from the boot before the last reboot?
Show answer
B. -b -1 selects the previous boot. It needs a persistent journal (/var/log/journal), which most server distributions enable.
From lesson 07 · systemd & journald in depthQ5. df says 100% used, but du on every directory adds up to much less. What's the classic cause?
Show answer
B. Deleting a file removes its name, but the space is only freed when no process has it open. Find them with 'lsof +L1', then restart (or signal) the process.
From lesson 08 · Disks & filesystemsQ6. Writes fail with 'No space left on device' but df -h shows 40% free. What should you check?
Show answer
B. Each file needs an inode. Millions of tiny files (caches, sessions, mail queues) can exhaust inodes while blocks remain free.
From lesson 08 · Disks & filesystemsQ7. Why run 'sudo mount -a' right after editing /etc/fstab?
Show answer
B. A bad fstab line can stop a server booting. Test immediately while you still have a working shell. Consider the 'nofail' option for non-critical mounts.
From lesson 08 · Disks & filesystemsQ8. What does 'lvextend -r' add?
Show answer
B. Growing the LV alone doesn't grow the filesystem. -r runs the right resize tool (resize2fs or xfs_growfs) for you.
From lesson 08 · Disks & filesystemsQ9. An app says 'connection refused' when calling db:5432. What does 'refused' usually mean?
Show answer
B. Refused = an RST came back. Timeouts, by contrast, usually mean packets are dropped (firewall, routing, host down).
From lesson 09 · Networking from the hostQ10. Which command shows which process is listening on port 443?
Show answer
B. ss -l (listening), -t (TCP), -n (numeric), -p (process). sudo is needed to see other users' processes.
From lesson 09 · Networking from the hostQ11. curl https://api.internal hangs, but curl https://10.0.5.20 answers immediately. Which layer is suspect?
Show answer
B. The IP works, so routing, the port and the app are fine. Check what the name resolves to with dig, and which resolver the host uses.
From lesson 09 · Networking from the hostQ12. Why start tcpdump with -n?
Show answer
B. -n shows raw IPs and ports. It's faster and avoids tcpdump generating DNS traffic of its own.
From lesson 09 · Networking from the hostQ13. A 4-core server shows a load average of 40, but CPU usage is low. What's a likely explanation?
Show answer
B. Linux load includes tasks in uninterruptible I/O wait. High load with idle CPUs points at storage (check iostat, and D-state processes in ps).
From lesson 10 · Performance triageQ14. free -h shows 'free: 200Mi' but 'available: 6Gi'. Is the server out of memory?
Show answer
B. Linux uses spare RAM as a disk cache. 'available' estimates what applications can still get without swapping.
From lesson 10 · Performance triageQ15. In the USE method, what does 'saturation' mean?
Show answer
B. Utilisation = how busy; Saturation = how much extra work is waiting; Errors = failures. Saturation is often where latency comes from.
From lesson 10 · Performance triageQ16. Where would you look to see if the kernel killed a process for using too much memory?
Show answer
B. The OOM killer logs to the kernel ring buffer. In containers it also shows as OOMKilled with exit code 137.
From lesson 10 · Performance triageQ17. Which part of an SSH key pair goes onto the server?
Show answer
B. The public key can be shared freely. The private key never leaves your machine (ideally protected by a passphrase or a hardware key).
From lesson 11 · SSH, keys & remote workQ18. SSH refuses your key with 'Permission denied (publickey)', even though the key is in authorized_keys. A common cause?
Show answer
B. sshd ignores authorized_keys if the home, .ssh or file permissions let others write to them. Check with ssh -v on the client and the auth log on the server.
From lesson 11 · SSH, keys & remote workQ19. Why run long jobs inside tmux on a remote server?
Show answer
B. Without tmux (or screen), a dropped connection sends a hangup to your shell and its jobs. tmux keeps the session alive on the server.
From lesson 11 · SSH, keys & remote workQ20. What does 'ssh -J bastion user@internal' do?
Show answer
B. ProxyJump chains SSH connections. Your keys stay on your laptop; the bastion only forwards the encrypted stream.
From lesson 11 · SSH, keys & remote workQ21. A service fails to start with 'Address already in use'. What's the next command?
Show answer
B. EADDRINUSE means another process is bound to the port. Find it, then decide whether it's a stale copy to stop or a real conflict.
From lesson 12 · Checkpoint: five broken serversQ22. sshd logs 'Authentication refused: bad ownership or modes for directory /home/deploy'. Fix?
Show answer
B. StrictModes makes sshd ignore keys when the home or .ssh directory is writable by others. Correct the modes; don't weaken sshd.
From lesson 12 · Checkpoint: five broken serversQ23. A host resolves nothing; /etc/resolv.conf says 'nameserver 127.0.0.53'. What's that address?
Show answer
B. On systemd-resolved systems, resolv.conf points at a local stub. If systemd-resolved is stopped, every lookup fails.
From lesson 12 · Checkpoint: five broken servers