Patch a unit with a drop-in

Change a unit without touching the vendor file; --full copies the whole unit for editing

systemctl edit <unit> # writes /etc/systemd/system/<unit>.d/override.conf

tool
systemd26 commands
tags
systemdgitopstroubleshooting

More systemd commands

  • systemctl daemon-reload

    Run it after manual edits, otherwise systemctl warns that the config is outdated

  • systemctl mask <unit> && systemctl unmask <unit>

    mask links the unit to /dev/null, so it cannot start even as a dependency (stronger than disable); unmask undoes it

  • systemctl list-dependencies <unit> --all

    Walk the whole Wants/Requires tree to see why a service pulls in others; --reverse shows who needs it

  • systemctl show -p MainPID,MemoryCurrent,TasksCurrent <unit>

    Read live cgroup metrics from systemd without ps; MemoryCurrent includes page cache, so it is not pure RSS

  • systemctl reset-failed && systemctl list-units --state=failed

    Reset failure counters so units can start again after StartLimitBurst, then list what is still failed

all 26 systemd commands