interview-prep

Most modern Linux uses systemd as the init system.

Command What
systemctl status <service> Service status
systemctl start <service> Start it
systemctl stop <service> Stop it
systemctl restart <service> Restart
systemctl reload <service> Reload config without restart
systemctl enable <service> Start on boot
systemctl disable <service> Don't start on boot
systemctl list-units --failed What's broken
journalctl -u <service> Service logs
journalctl -u <service> -f Follow logs (tail -f equivalent)
journalctl --since "1 hour ago" Time-filtered logs
journalctl -p err Only errors

My notes