systemd cheat sheet

Work with Units

List units

CommandDescription
systemctl list-unitslist units
systemctl list-units --type=servicelist only services
systemctl list-units --state=failedlist only failed units

Configure units

CommandDescription
systemctl list-unit-fileslist unit files (configurable units)
systemctl show cgmanager.serviceshow all configuration values of unit
systemctl cat cgmanager.serviceshow all files of unit
systemctl edit cgmanager.serviceEdit service and overwrite some configuration values

Analyze system

CommandDescription
systemd-analyzegeneral time information
systemd-analyze critical-chainshows the units and times until system was booted
systemd-analyze plot > bootpath.svggenerates graphic with timings of all started units
systemd-analyze dot | dot -Tsvg >dependencygraph.svggenerates a full dependency graph of all units