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
| Command | What it does |
|---|---|
systemctl status nginx | Is the service running, and what did it last say? |
sudo systemctl restart nginx | Stop and start the service. |
sudo systemctl reload nginx | Re-read its config without dropping connections (if supported). |
sudo systemctl enable --now nginx | Start it now and on every boot. |
sudo systemctl disable --now nginx | Stop it and stop it starting on boot. |
systemctl list-units --failed | Show everything that has failed. |
systemctl list-unit-files --state=enabled | Show what starts on boot. |
sudo systemctl daemon-reload | Re-read unit files after editing one. |
Reading logs with journalctl
| Command | What it does |
|---|---|
journalctl -u nginx | All log lines for one service. |
journalctl -u nginx -f | Follow that service's log live. |
journalctl -u nginx -n 50 --no-pager | Last 50 lines, printed straight out. |
journalctl -b | Everything since this boot. |
journalctl -b -1 | Everything from the previous boot (useful after a crash). |
journalctl -p err -b | Only errors and worse since boot. |
journalctl --since "1 hour ago" | Logs from the last hour. |
journalctl -k | Kernel messages only. |
Boot and system
| Command | What it does |
|---|---|
systemd-analyze blame | Which units slow the boot most. |
systemd-analyze critical-chain | The chain of units that held up boot. |
systemctl is-system-running | Overall state: running, degraded and so on. |
journalctl --disk-usage | How much space the journal is using. |
sudo journalctl --vacuum-size=500M | Trim the journal down to 500 MB. |
systemctl --user status | State 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.