systemd isn’t touched by the end user directly. End user’s work with
systemd by using the
systemctl package and by defining
systemd unit files.
systemctl gives the end user access to information and control over all services, daemons, and unit files.
Knowing some of the basic commands of
systemctl is necessary for working with services.
Show terse runtime status information about one or more units, followed by most recent log data from the journal.
systemctl status nginx
status command displays the current status of a specific service.
Start (activate) one or more units specified on the command line.
sudo systemctl start nginx
start command starts a service.
Stop (deactivate) one or more more units specified on the command line.
sudo systemctl stop nginx
stop command stops a service.
Enables one or more units… …Enabling simply hooks the unit into various suggested places (for example, so that the unit is automatically started on boot or when a particular kind of hardware is plugged in).
sudo systemctl enable nginx
enable command will automatically start a service at a specific computer runtime target. For example a service may be configured to start when the computer boots.
Disables one or more units.
sudo systemctl disable nginx
disable command will not automatically start a service at a specific computer runtime target.
All units can be listed with the
In the following articles we will explore the Caddy and NGINX unit files that were automatically created when those tools were installed on the computer.