The Linux Operating System
Domain 4 - The Linux Operating System
This domain tests how the system fits together: kernel and user space, hardware devices, the boot sequence, processes, and where files live in the filesystem hierarchy.
Core rules
- The kernel manages CPU, memory and devices, and exposes hardware as device files under
/dev:/dev/sdais the first disk,/dev/sda1its first partition,/dev/nulldiscards writes. - Boot order: firmware (BIOS/UEFI) → bootloader (GRUB) → kernel plus initramfs →
init, which on modern systems is systemd running as PID 1.systemctl status,start,stop,enableanddisablemanage units. - Every process has a PID, owner, priority and state;
ps auxandtopshow them.kill -TERM(15) asks politely,kill -9(SIGKILL) cannot be caught./procholds live kernel and process data as pseudo-files. - FHS essentials:
/etcconfiguration,/varvariable data such as logs and spools,/homeuser data,/tmpscratch space,/usrprograms and libraries,/binand/sbinessential binaries,/bootkernel and GRUB files,/optadd-on software,/srvservice data.
Worked example
A web service fails at boot. systemctl status nginx reports the failed unit; journalctl -u nginx shows the error, typically a bad path or directive in /etc/nginx/. Reasoning: configuration lives in /etc, logs in /var/log or the journal, and systemd reports unit state - check the unit, then the config, rather than reinstalling first.
Traps
- Treating
/procor/sysas real files stored on disk. - Confusing the kernel with the distribution that ships it.
- Reaching for
kill -9first; it prevents the process from cleaning up. - Editing files under
/usrby hand instead of using the package manager.