The documentation at systemd.unit contains this handy table (shortened to the relevant parts):
Path | Description |
---|---|
/etc/systemd/system |
System units created by the administrator |
/run/systemd/system |
Runtime units |
/usr/local/lib/systemd/system |
System units installed by the administrator |
/usr/lib/systemd/system |
System units installed by the distribution package manager |
No package should install unit files into /etc/systemd
.
And yes, Debian based systems use /lib/systemd/system
and not /usr/lib/systemd/system
.