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 cat prints a systemd unit together with all its drop-ins

Systemd
~/tips/tip-systemd-systemctl-cat-shows-dropins

systemctl cat nginx.service

Prints the unit file plus every drop-in override in application order.

When a service behaves oddly I want the effective unit file, not just the one in /lib.

systemctl cat nginx.service

The output starts with a comment showing the path of each file and then its content: the main unit first, then every drop-in from /etc/systemd/system/nginx.service.d/ in the order they are applied. Settings in later files win. That makes it the quickest way to see what an override changed. It reads the files on disk, so a unit you edited but did not reload still shows the new text. Use systemctl show for the values systemd actually uses.

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