systemctl status nginxIs it running, since when, and its last few log lines. Start here.
Cheat sheet
Starting, stopping and fixing services with systemctl, and finding out what went wrong with journalctl.
Nothing you type here is sent. Nothing is saved, unless you switch on Remember. Privacy policy
For any Linux that uses systemd, which is nearly all of them now. "Since" takes plain English like yesterday,
10 min ago or a date like 2026-11-05 09:00. Reading other services' logs needs sudo, or membership of the
systemd-journal group (adm on Debian and Ubuntu).
Nothing matches that. Try fewer words, or a shorter one.
systemctl status nginxIs it running, since when, and its last few log lines. Start here.
sudo systemctl restart nginxStop it and start it again.
sudo systemctl reload nginxRe-read its config without stopping it, for services that support it (nginx does). No dropped connections.
sudo systemctl enable --now nginxStart it now, and at every boot.
--nowsudo systemctl disable --now nginxStop it now, and don't start it at boot.
sudo systemctl mask nginxMake it impossible to start, even by something that depends on it. unmask undoes it.
systemctl is-active nginxJust "active" or not. Handy in scripts.
systemctl --failedEverything that has failed. Worth a look after a reboot.
systemctl list-units --type=service --state=runningEvery service that's running.
systemctl cat nginxThe service's unit file, plus any overrides, exactly as systemd sees them.
sudo systemctl edit nginxAdd your own settings in an override file, so a package update can't overwrite them.
sudo systemctl daemon-reloadMake systemd notice unit files you've changed by hand. Then restart the service.
systemctl list-dependencies nginxWhat the service needs before it can start.
journalctl -u nginx -eA service's logs, starting at the end.
-u-ejournalctl -u nginx -fWatch a service's logs live. Ctrl+C stops.
journalctl -u nginx --since '1 hour ago'A service's logs from a point in time.
journalctl -u nginx -n 100 --no-pagerThe last 100 lines, printed straight out. Good for pasting into a ticket.
journalctl -b -p errEvery error since the last boot, from anything.
-b-p errjournalctl -b -1 -eThe end of the previous boot. Where to look after a crash (if the journal is kept on disk).
journalctl -kMessages from the kernel: disks, network cards, out-of-memory kills.
journalctl --disk-usageHow much space the logs are taking.
sudo journalctl --vacuum-time=2weeksThrow away logs older than two weeks.
systemctl list-timersEvery scheduled job, when it last ran and when it runs next.
sudo systemd-run --on-active=30m touch /tmp/doneRun a one-off command in 30 minutes, without writing a timer file.
systemd-analyze blameWhat made the last boot slow, slowest first.
hostnamectlThe machine's name, OS and kernel at a glance.
timedatectlThe time, the timezone, and whether the clock is syncing.
sudo timedatectl set-timezone Pacific/AucklandSet the timezone (timedatectl list-timezones for the rest of the world).
sudo systemctl rebootRestart the machine.