Chapter 22: Review and practice

Linux administration final review cheat sheet

The chapter on one page, and the whole course in a table: where each skill lives, so you can find the right chapter when a real fault shows up.

The chapter in eight sentences

Where to look

Symptom to chapter

SymptomGo to
Cannot log in, wrong owner or modeaccounts, permissions
Service stopped or failingservices, logs
SSH problemsSSH
No network, wrong namenetworking
Package or repositorydnf
403 or a failed bindSELinux
Full or missing diskstorage, LVM
Remote filesNFS and autofs
Blocked connectionfirewall
Container servicecontainers

Evidence commands

LayerCommands
Identityid, ls -l, getfacl
Service`systemctl status
Networkss -tlnp, firewall-cmd --list-all, curl -m 3
SELinuxgetenforce, ls -Z, `semanage port
Recoverysystemctl list-timers, tar -tzf, sha256sum

Flashcards

The four kinds of proof?
Configuration (saved intent) · live inspection · a client operation · a lifecycle test after reload or reboot
Build order?
Contract → identity and software → files, labels, service → network → persistence and recovery
The diagnosis loop?
State the failure → narrow baseline → rank hypotheses → one change → repeat the failing request → record
refused / no route / timeout?
Not listening / firewall reject / dropped
403 on the portal?
Mode and ACL for apache, the SELinux label (restorecon), the path
Service will not bind a port?
semanage port -a -t http_port_t -p tcp PORT, then restart
Label the content permanently?
semanage fcontext -a -t httpd_sys_content_t "/srv/portal(/.*)?" · restorecon -Rv /srv/portal
One caller only?
Zone with --add-source=IP and --add-port=PORT/tcp, then --reload
Scheduled backup?
oneshot service + timer with OnCalendar=daily, Persistent=true; tar --acls --selinux
Safe restore?
Unpack to a staging directory · inspect · cp -a --preserve=all · restorecon -v · repeat the request
Handover?
Purpose · changes · operation · recovery · known failures · limits
Next?
Automate the manual state with Ansible