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: systemd-delta shows every config file you or a package changed

Systemd
~/tips/tip-systemd-delta

systemd-delta --no-pager

List all overridden, extended and masked systemd files on a machine in one go.

On a server that has been around for a while, it is hard to remember which units were tweaked. systemd-delta knows, because it compares /etc with the vendor files in /usr/lib.

systemd-delta --no-pager

Each line has a tag in square brackets. [OVERRIDDEN] means a file in /etc replaces the vendor copy, [EXTENDED] means drop-ins add to it, [MASKED] means it is linked to /dev/null. Even a fresh Ubuntu container can show lines like [EXTENDED] /usr/lib/systemd/system/[email protected] → /usr/lib/systemd/system/[email protected]/timeout.conf and a total at the end.

To focus on your own changes:

systemd-delta --type=overridden,extended,masked /etc

It covers more than units. Files like journald.conf or anything under tmpfiles.d and sysctl.d show up too, so this is a good first command before a distribution upgrade or when you inherit a box from someone else.

For overridden files it can also print a diff, which tells you if your copy in /etc is missing newer vendor changes. A full override freezes the old version, so after upgrades I’d check those first and turn them into small drop-ins where possible.

Further reading: systemd-delta man 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