On Debian some systemd services are installed to /usr/lib/systemd/*/*.service
, e.g.:
/usr/lib/systemd/user/org.gnome.Evince.service
/usr/lib/systemd/user/pulseaudio.service
/usr/lib/systemd/user/gpg-agent.service
Other services (actually much more) are in /lib/systemd/*/*.service
/lib/systemd/system/networking.service
/lib/systemd/system/sddm.service
/lib/systemd/system/apache2.service
/lib/systemd/system/dm-event.service
/lib/systemd/system/ModemManager.service
There are folders in /lib/systemd
:
/lib/systemd/network/
/lib/systemd/system/
/lib/systemd/system-generators/
/lib/systemd/system-preset/
/lib/systemd/system-shutdown/
/lib/systemd/system-sleep/
/usr/lib/systemd
:
/usr/lib/systemd/boot/
/usr/lib/systemd/catalog/
/usr/lib/systemd/scripts/
/usr/lib/systemd/system/
/usr/lib/systemd/user/
/usr/lib/systemd/user-environment-generators/
/usr/lib/systemd/user-generators/
/usr/lib/systemd/user-preset/
So, what is the difference of these two directories? Systemd documentation does not mention /lib/systemd
at all.
Is it the place chosen by distro or software upstream?
E.g. for Apache Debian uses /lib/systemd/system/apache2.service
, but buildroot /usr/lib/systemd/system/apache.service
(it looks like buildroot also uses /lib/systemd
at all).
Is it somehow affected by /usr
merge?
Everybody cares just about difference between /usr/lib/systemd/system and /etc/systemd/system (it touches the topic showing that path for Units of installed packages
is distro specific – Centos 7 uses /usr/lib/systemd/system
, Debian /lib/systemd/system
, but Debian uses both paths).