LFCE study materials
LFCE study resources

LFCE: Linux System Administration

LFCE · Work through your exam, one topic at a time.

All guide sections

Linux System Administration

What this domain covers

The system administration domain of the LFCE checks whether you can operate a systemd-era host rather than just log in to one: unit and target control, persistent kernel tuning, logging, and resource constraints. Expect tasks where the command is easy but the persistence or the diagnosis is what is graded.

Core rules

  • Package unit files live in /usr/lib/systemd/system; local changes belong in /etc/systemd/system as drop-ins made with systemctl edit foo.service. Always follow with systemctl daemon-reload.
  • systemctl mask symlinks a unit to /dev/null and prevents it starting even as a dependency; disable only removes autostart links.
  • systemctl get-default and set-default switch between multi-user.target and graphical.target. Custom targets pull units in with Wants= or Requires=.
  • Kernel tunables belong in /etc/sysctl.d/*.conf, applied with sysctl --system; sysctl -w is temporary. Module options go in /etc/modprobe.d/, load-at-boot lists in /etc/modules-load.d/.
  • Journal data is volatile unless /var/log/journal exists. journalctl -u foo -b -p err --since '1 hour ago' is the standard triage line.
  • Resource limits use cgroup v2: CPUQuota=50%, MemoryMax=1G, IOWeight= in a slice or unit drop-in; observe with systemd-cgtop.

Worked example

A service restarts every 30 seconds. systemctl status foo reports status=1/FAILURE; journalctl -u foo -b shows the process exiting after failing to bind its port. ss -ltnp | grep 8080 names the unit already holding it. The correct fix is stopping or reconfiguring the conflicting unit, not raising Restart= or StartLimitBurst - those only hide the conflict.

Traps that cost marks

Editing packaged unit files directly (changes vanish on upgrade); forgetting daemon-reload so a drop-in appears to do nothing; assuming disable stops dependency-triggered starts; writing sysctl lines into a shell profile instead of a .conf file; using ExecStart with an ampersand instead of Type=forking or a socket unit.