systemd & systemctl
systemd is the init system on most modern Linux distributions — it starts services at boot and manages them while the system runs. systemctl is the command you use to control it.
Check a service's status
systemctl status nginx
systemctl status sshd
Shows whether it's running, since when, recent log lines, and the process tree.
List running services
systemctl list-units --type=service
systemctl list-units --type=service --state=running
List all unit files (including disabled)
systemctl list-unit-files --type=service
Is a service enabled at boot?
systemctl is-enabled nginx
systemctl is-active nginx
Reading a status output
● nginx.service - A high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: active (running) since Mon 2024-01-15 09:00:00 UTC
● green = running, red = failed/stopped.