Why are systemd unit files located in /usr/lib/systemd instead of /usr/share/systemd?

This is more of a general question but I've always wonder why that location is chosen instead of /usr/share/systemd
5 Replies
Akzel
Akzel15mo ago
systemd reads from /usr/lib/systemd, not /usr/share/systemd. the unit files wouldn't be recognized if they were in the latter see here, too: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
EyeCantCU
EyeCantCU15mo ago
Systemd services and timers are providing more of a library than they are shared program files so I'd imagine that's why Not to mention, systemd itself provides a library of programs and utilities
shitposter
shitposter15mo ago
I mean, generally architecture specific stuff goes in lib and architecture independent stuff goes in share. But systemd gonna systemd
EyeCantCU
EyeCantCU15mo ago
/usr/lib (in the file hierchy standard) permits executables be ran indirectly whereas /usr/share does not. While I am not 100% certain, that could be why they opted to use it over the former
dnkmmr
dnkmmrOP15mo ago
sometimes there are non architecture specific stuff in /lib if they are executables ran indirectly
Want results from more Discord servers?
Add your server