systemd units
In most Linux distributions – aside from Docker containers – systemd
runs the show. We’ve already covered the basics of systemd
in this book (see Chapter 3, Service Management with systemd), and in this section, we’ll take a quick look at how systemd
manages configuration for programs.
First, a quick review, in case Chapter 3 seems awfully distant: in a systemd-managed Linux environment, services are packaged into systemd
unit files, which wrap and control the actual executable binary, its arguments, the commands used to launch, restart, and stop the unit, and much more.
There are many systemd unit types, as we’ve already covered, but we’re interested in the service
unit type here.
We’ve already covered the fact that unit files can exist in several different directories, depending on their purpose, but your own custom systemd units will usually live in /etc/systemd/system
.
To understand how a systemd unit...