brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: systemctl list-dependencies --reverse shows what depends on a systemd unit

Systemd
~/tips/tip-systemd-list-dependencies-reverse

systemctl list-dependencies --reverse docker.service

Shows which units depend on a given unit, before you stop or disable it.

Before I stop or mask a unit I want to know what else pulls it in.

systemctl list-dependencies --reverse docker.service
systemctl list-dependencies --all multi-user.target

--reverse lists the units that depend on the given unit, such as targets that want it. Without it the command shows what the unit itself needs. By default only targets are expanded, and --all recurses into every unit type. Green and red dots show whether each unit is active. An empty list does not mean the unit is unused, because a program can still talk to it directly, so check before you stop or mask it.

Further reading: systemctl manual page

More Systemd tips [Service] sudo mkdir -p /etc/systemd/system/service.d [Service] printf 'hunter2' | sudo systemd-creds encrypt --name=dbpass – dbpass.cred systemd-analyze timespan 1h30min All Systemd tips (88) All topics

Link