Linuxlab

systemd services in Linux: the systemctl command

Updated July 3, 2026

systemctl manages services through systemd: it starts, stops and enables them at boot.

Syntax

systemctl ACTION name.service

Common cases

systemctl status nginx       # the service state
sudo systemctl start nginx   # start it now
sudo systemctl stop nginx    # stop it
sudo systemctl enable nginx  # start it automatically at boot
sudo systemctl restart nginx # restart it
systemctl list-units --type=service  # list services

How it works: start and enable are different

start runs a service right now, but it will not come back after a reboot. enable adds the service to the boot list but does not start it now. So for a new service people often do both at once: enable --now does the two together. systemd is the first process on the system (PID 1): it starts at boot and brings up every other service from its unit files. You read a service's logs with journalctl -u name.

In the book

This topic is covered in full in the chapter Services and systemd.

See also

Logs: journalctl.