systemd Cheat Sheet

systemctl

List units
systemctl

systemctl start/stop/restart/reload unit

systemctl status unit

systemctl is-enabled unit

systemctl mask unit – Prevent a unit from starting

systemctl unmask unit – Allow a unit to start

systemctl reboot/poweroff

Copy the unit file and create a custom version (overriding the original)
systemctl edit –full unit

Show units that failed to start
systemctl –failed

Target Runlevels

rescue.target Single user mode
multi-user.target Multi-user, non-graphical
graphical.target Multi-user, graphical

Switching targets
systemctl isolate multi-user.target

journalctl

List entire log (in a less style interface)
journalctl

Real-time log display
journalctl -f

Show log messages relating to a specific PID
journalctl _PID=1234

Show log messages relating to a specific unit
journalctl -u unit

Leave a comment