Linuxlab

Chapter 4

Services and systemd

Updated July 3, 2026

After boot the kernel starts one process with PID 1. On most modern distributions that is systemd. It starts first, does not exit until shutdown, and runs everything else: it brings up background programs, watches that they keep running, and restarts the ones that crash. A daemon (a background service) lives without a terminal and without your involvement. A web server, ssh, the system journal are daemons.

Check who is PID 1 on your machine:

$ ps -p 1 -o comm=
systemd

systemd describes every managed object as a unit. A service unit has a name with the .service suffix: ssh.service, nginx.service. There are other types too (sockets, timers, mount points), but this chapter is about servi

Locked

The rest of this chapter is part of a paid course

You are reading the open part. Buy the course to read the whole chapter.

See the course