⚙️ systemd

Service Manager · Unit Files · Journal · Boot

Service Control
systemctl start unit
Start a unit immediately (does not persist across reboots)
systemctl stop unit
Stop a running unit
systemctl restart unit
Stop then start — used after config changes that need a full restart
systemctl reload unit
Ask the service to re-read its config (SIGHUP) without killing it
systemctl reload-or-restart unit
Reload if supported, otherwise restart
systemctl enable unit
Enable unit to start at boot (creates symlink in target wants/)
systemctl enable --now unit
Enable and immediately start in one command
systemctl disable unit
Disable autostart at boot (removes symlink)
systemctl mask unit
Hard-block a unit — symlinks to /dev/null, cannot be started at all
systemctl unmask unit
Remove the /dev/null block, restoring the unit
Status & Inspection
systemctl status unit
Show state, PID, last log lines, and active/failed status
systemctl is-active unit
Print active or inactive — exit code 0 = active
systemctl is-enabled unit
Print enabled, disabled, masked, etc.
systemctl is-failed unit
Exit 0 if unit is in failed state — useful in scripts
systemctl list-units
List all loaded units and their state
systemctl list-units --failed
Show only units in a failed state
systemctl list-unit-files
List installed unit files and whether they're enabled
systemctl list-timers
Show all timers with next/last trigger times
systemctl list-dependencies unit
Show dependency tree for a unit
systemctl cat unit
Print the unit file(s) as loaded, including drop-ins
systemctl show unit
Dump all low-level properties for a unit (key=value format)
System State
systemctl daemon-reload
Re-read all unit files after editing — required before restart takes effect
systemctl daemon-reexec
Re-execute systemd itself (upgrade in place without losing state)
systemctl poweroff
Shut down and power off the system
systemctl reboot
Reboot the system cleanly
systemctl suspend
Suspend to RAM
systemctl hibernate
Suspend to disk (swap)
systemctl rescue
Drop into rescue mode (single-user target)
systemctl isolate target
Switch to a different target (e.g. graphical.target), stopping units not in it
systemctl set-default target
Set the default boot target (replaces runlevel in SysV)
systemctl get-default
Print the current default boot target
systemctl edit unit
Create a drop-in override file (preserves vendor unit, safer than editing directly)
systemctl edit --full unit
Edit a full copy of the unit file in /etc/systemd/system/
systemd-analyze blame
List units sorted by startup time — find boot bottlenecks
systemd-analyze critical-chain
Show the critical path of the boot sequence