systemd services in Linux: the systemctl command

Updated November 1, 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

Sample output

$ systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled)
     Active: active (running) since Sun 2026-07-26 03:58:47 UTC; 3s ago
       Docs: man:nginx(8)
    Process: 270 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 271 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 273 (nginx)
      Tasks: 11 (limit: 14455)
     Memory: 8.1M (peak: 8.4M)
        CPU: 17ms
...

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.

Common mistakes

systemctl start nginxx answers Failed to start nginxx.service: Unit nginxx.service not found. - systemd does not guess close names. The unit name does not always match the program name: on Ubuntu 24.04 systemctl status sshd says Unit sshd.service could not be found., because the unit here is ssh.service and sshd.service is the RHEL name. systemctl list-unit-files 'ssh*.service' shows the exact one.

Edit a unit file or a drop-in and restart still uses the old version. systemd keeps parsed units in memory and says so: Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units. It restarts the service anyway, with the old settings. Run sudo systemctl daemon-reload first, then restart.

Not every service has a reload. systemctl reload cron answers Failed to reload cron.service: Job type reload is not applicable for unit cron.service.: the unit has no ExecReload line, so this service cannot re-read its config on the fly. restart always works, but it stops the process and drops open connections, while reload keeps them.

In the book

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

See also

Logs: journalctl.