Where Are systemd Unit Files Stored?
systemd system versus user unit dirs (/etc, /run, /lib) and the systemctl commands that reveal them.
Last updated
systemd reads units from a tiered set: yours in /etc/systemd/system win over package files in /lib/systemd/system, with /run for runtime state. User services mirror the same tiers under .config/systemd/user.
Never edit package units in place. Drop an override snippet via the edit command, which writes the /etc side correctly and survives updates.
Where Linux stores this, by platform
/etc/systemd/system
Admin overrides and enables live here. Package originals under /lib/systemd/system (or /usr/lib on some distros). Reload the daemon after changes.
Frequently asked questions
How do I find which unit file a service uses?
Show the service properties and read the fragment path. That line names the exact file systemd parsed.
Where do user (non root) services go?
Under ~/.config/systemd/user with the user manager flag. They start at your login, not at boot.
Notice an outdated path? Let us know.