Updated November 2026 · any systemd-based distribution · print-friendly

The commands we reach for most when a service will not start or a machine is misbehaving. Use sudo where needed. This page prints cleanly if you want a paper copy.

Services

CommandWhat it does
systemctl status nginxIs the service running, and what did it last say?
sudo systemctl restart nginxStop and start the service.
sudo systemctl reload nginxRe-read its config without dropping connections (if supported).
sudo systemctl enable --now nginxStart it now and on every boot.
sudo systemctl disable --now nginxStop it and stop it starting on boot.
systemctl list-units --failedShow everything that has failed.
systemctl list-unit-files --state=enabledShow what starts on boot.
sudo systemctl daemon-reloadRe-read unit files after editing one.

Reading logs with journalctl

CommandWhat it does
journalctl -u nginxAll log lines for one service.
journalctl -u nginx -fFollow that service's log live.
journalctl -u nginx -n 50 --no-pagerLast 50 lines, printed straight out.
journalctl -bEverything since this boot.
journalctl -b -1Everything from the previous boot (useful after a crash).
journalctl -p err -bOnly errors and worse since boot.
journalctl --since "1 hour ago"Logs from the last hour.
journalctl -kKernel messages only.

Boot and system

CommandWhat it does
systemd-analyze blameWhich units slow the boot most.
systemd-analyze critical-chainThe chain of units that held up boot.
systemctl is-system-runningOverall state: running, degraded and so on.
journalctl --disk-usageHow much space the journal is using.
sudo journalctl --vacuum-size=500MTrim the journal down to 500 MB.
systemctl --user statusState of your own user-level services.

A good first move on any failed service: run systemctl status for the summary, then journalctl -u name -b for the full story since boot.