Linux Labs

Packages, services, and logs / Stage 8 of 13

Your own service unit and applying changes

Not running Starting usually ~20 s
Leave the lesson

Step 3 of 7 · on a machine · 6 min

The file, the description and the process

A unit change passes through three places, and at the start of the lesson it got stuck in the first. This step shows what daemon-reload does with it.

The first place is the file on disk. The second is the description loaded into systemd: systemd starts the service from it and prints the status summary from it. daemon-reload carries the file into the description. The third is the service's running process. See what daemon-reload does to it on lab-worker, whose file has a changed service description, Description.

Exercise · look

Reload the description

See which description (Description) and which main process systemd knows for lab-worker, reload the unit files and read the service summary.

First, predict

What will the status summary show after daemon-reload?

Now start the exercise, run the command and compare your prediction with the output.

Sign in and start The machine is available after signing in

systemd updated the description at once, while the process stayed the same. The lines the process is started from, User and ExecStart, reach only a new process. That is why a service is restarted after such lines change.

Ubuntu 24.04
Loading…