Understanding the systemd unit files
Instead of using a set of complex Bash shell scripts, the systemd
init
system controls system and service operations with various types of unit files. Each unit file has a filename with a filename extension that describes which type of unit it is. Before we look at these files, let's see where they live.
The /lib/systemd/system/
directory is the default location for unit files that either come with the operating system or come with any packages that you might install. There might be times when you'll either need to modify some of these unit files or even create your own, but you won't do that in this directory. Instead, you'll do that in the /etc/systemd/system/
directory. Any unit files in this directory that have the same name as unit files in /lib/systemd/system/
take precedence.
Tip
You can read about unit files by typing the following: man systemd.unit
.
At the bottom of this man page, you'll see where it...