Skip to content
BENIBIX Learn

systemd

Infrastructure⌨️ Linux & the Command LineProcesses and Services

Also known as systemctl, systemd Service, Unit File

The program that starts and checks on each service on Linux.

Think of it like

Think of it like a stage manager. It starts each act on time and restarts any that trips.

Example

Lucy changes her web server's settings. She runs sudo systemctl restart nginx, then checks it is active.

Why it matters

Starting, stopping and checking any service on a server goes through it.

Definition

systemd is the first program Linux starts at boot, and it starts all the rest. It brings up daemons in the right order. It restarts one if it crashes. You talk to it with the systemctl command. Each service is described in a small text file called a unit file.

Example code

console
$ sudo systemctl restart nginx
$ systemctl is-active nginx
active
Restart the web server, then ask systemd whether it came back up.
systemd sits at the top. It starts each daemon below it and restarts any that stop.

Common mistake

Starting a service but not enabling it. It runs now, but it will not come back after a reboot.

Key takeaways

  1. 1
    First at boot. It starts everything else.
  2. 2
    systemctl. The command to control it.
  3. 3
    Enable to keep. Enable means start at boot.

Learn it properly