On Sat 12 Nov 2022 at 18:12:28 (-0500), pa...@quillandmouse.com wrote: > On Sat, 12 Nov 2022 11:04:39 -0500 Greg Wooledge wrote: > > On Sat, Nov 12, 2022 at 10:41:15AM -0500, pa...@quillandmouse.com > > wrote: > > > Folks: > > > > > > I've been reading up on systemd, both from Red Hat's documentation, > > > Debian's and the man files. One thing I haven't been able to > > > explain is why systemd has config files in /etc, /lib, /run, and > > > /usr/lib. > > > > /lib and /usr/lib are the same thing, or will be the same thing in a > > future release. Don't worry about that. > > > > /run is transient. It's an in-memory file system, created and > > populated at boot time, or by running programs. It's not a place for > > configuration. > > > > So really you're looking at /etc vs. /usr/lib. > > > > /usr/lib contains the defaults created by the Debian maintainers or > > the upstream authors. When you install a new package that has a > > systemd unit file, that's where it'll go. > > > > /etc contains the overrides and configuration elements that are unique > > to your system. If a service is masked or disabled, it'll be done > > here. If you install a locally built service, and write a systemd > > unit for it, this is where you'll put it. If you override part or > > all of a package's unit file, you do it here. > > > > Thanks for this excellent explanation. I wish the folks who write docs > would try to explain things in English instead of geek-ese. I'm a > programmer, and I try to keep this in mind whenever I write docs. That > said, though, the Red Hat docs for systemd are pretty good.
You might try reading the similar explanations that sometimes appear at the start of a few systemd manpages from section 5; for example, systemd.dnssd, systemd.link, systemd.netdev and systemd.network are the ones installed on this system of mine. It's also touched on in http://0pointer.de/blog/projects/three-levels-of-off which is part of a series of blogs on systemd. Perhaps peruse https://www.freedesktop.org/wiki/Software/systemd/ for a large number of systemd documents and background. Cheers, David.