Systemd unit files exist in multiple directories. Which of these
directories has precedence?
So the order of precedence is:
I remember them in this order becasue they're alphabetical. /etc, then /run, then /usr/lib
According to man 5 systemd.unit, they are as below from hugher to lower precedence.
/etc/systemd/system.control
/run/systemd/system.control
/run/systemd/transient
/run/systemd/generator.early
/etc/systemd/system
/run/systemd/system
/run/systemd/generator
/usr/local/lib/systemd/system
/usr/lib/systemd/system
/run/systemd/generator.late
There's no more definitive response than one from a manpage!!!
Great response TM!!!
The configuration files from the /etc/systemd/system/ configuration directories take precedence over unit files in /usr/lib/systemd/system/ and the run time files at /run/systemd/system has a precedence higher than the /usr one but less than the /etc ones.
So the order of precedence is:
I remember them in this order becasue they're alphabetical. /etc, then /run, then /usr/lib
Never thought about looking in an alphabetical order.
That's a big help!
Thanks Tracy!!!
Loving this!
Thanks Chetan!!!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.