Cheatsheet Pages / systemd Cheatsheet

How to see a unit's dependency tree — systemctl list-dependencies

A unit starts things you did not expect — or fails because something it needs did not start.

Most management commands need sudo, and systemctl only works on a system actually booted with systemd — inside containers it fails with “System has not been booted with systemd as init system”. Every command was checked against systemd 255, and the example units pass systemd-analyze verify.

systemctl list-dependencies nginx        # what this unit needs, recursively, as a tree
systemctl list-dependencies --reverse nginx  # the other way: who needs THIS unit
systemctl list-dependencies multi-user.target  # everything a normal boot pulls in
systemd Cheatsheet one-page card — commands that actually work
The full one-page card — systemd Cheatsheet. Get the complete cheatsheet on GitHub