View and Override Unit Files with systemctl cat/edit
systemctl cat reveals a service's unit file plus every drop-in override; systemctl edit creates overrides without touching vendor files.
01Command
$ systemctl cat nginx.service02What it does
The often-missed detail is that drop-in fragments in /etc/systemd/system/<unit>.d/*.conf add to or replace vendor settings, so what's running may differ from the file in /lib/systemd/system. `systemctl edit` opens an editor pre-seeded for an override and runs daemon-reload automatically. To undo all local changes and return to the packaged file, use `sudo systemctl revert <unit>`.
03Risk
04Undo
$ sudo systemctl revert nginx.service && sudo systemctl daemon-reload05Sources
- systemctl(1) - Linux manual pageEvidence: systemctl cat shows the unit file including any drop-ins; systemctl edit creates an override; systemctl revert restores the vendor version.
Last verified: 2026-09-17 · Category: System & Settings
06Related solutions
systemd runs a per-user service manager: units in ~/.config/systemd/user/ can start at login without sudo.
timedatectl lists, sets, and verifies the system timezone and NTP sync status on systemd distributions.
hostnamectl sets the static, transient, and pretty hostname in one step on systemd distros, no reboot required.