Systemd Units
In most Linux distributions – outside of containers – systemd runs the show. Services are packaged into systemd unit files, which wrap and control the actual executable, its arguments, the commands used to launch, restart, and stop the unit, and much more. Unit files are read and interpreted by systemd to create Units.
There are many systemd unit types:
- service
- socket
- device
- mount
- automount
- swap
- target
- path
- timer
- slice
- scope
We’re interested in the service
unit type here.
Unit files can exist in several different directories, depending on their purpose – there’s another hierarchy here which we won’t explore – but your custom systemd units will usually live in /etc/systemd/system
.