systemd is modified via a configuration file, rather than a shell script. Before you perform anything too ambitious, we will take a look at how we stop, start, enable, and disable a service.
Our example will reset and reconfigure a key service that will run in your Debian distribution: the systemd-timedated.service
by default.
Perform the following steps:
Navigate to the
systemd
directory (root user) with the following code:# cd /lib/systemd/system
Let's see what services are running, using a command that serves as the control utility for
systemd
, as shown in the following code:# systemctl
You should see a long, fat list of services that show their current status on the system. The items appended with the
.service
filename aresystemd
services and controllable via the command line.Run this command to stop the service:
systemctl stop systemd-timedated.service
Now, disable the service using the following code:
systemctl disable systemd-timedated...