systemd cheat sheet

Work with Units

List units

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

Configure units

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

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