systemctl Commands
systemctl commands cheatsheet.
Start, stop, enable and inspect systemd services — plus the journalctl commands to read their logs. Tap to copy.
Service control
sudo systemctl start nginxStart a service nowsudo systemctl stop nginxStop a running servicesudo systemctl restart nginxRestart (stop then start) a servicesudo systemctl reload nginxReload config without a full restartsudo systemctl enable nginxStart the service automatically at bootsudo systemctl disable nginxDon't start the service at bootsudo systemctl enable --now nginxEnable at boot and start immediatelyStatus & inspection
systemctl status nginxShow whether a service is running, with recent logssystemctl is-active nginxPrint active or inactive for a servicesystemctl is-enabled nginxCheck whether a service starts at bootsystemctl list-units --type=serviceList loaded services and their statesystemctl --failedList units that failed to startsystemctl list-unit-files --state=enabledList everything enabled at bootLogs (journalctl)
journalctl -u nginxShow logs for one servicejournalctl -u nginx -fFollow a service's logs livejournalctl -u nginx --since "1 hour ago"Logs for a service within a time windowjournalctl -bLogs since the last bootjournalctl -p errOnly error-priority messages and worseSystem state
sudo systemctl daemon-reloadReload unit files after editing themsudo systemctl rebootReboot the machinesudo systemctl poweroffShut the machine downsystemctl get-defaultShow the default boot targetsudo systemctl set-default multi-user.targetBoot to console instead of the GUIManaging services with systemd
systemd is the init system on most modern Linux distributions, and systemctl is how you control it — starting, stopping, enabling and checking services. The distinction worth remembering: start affects a service right now, while enable controls whether it comes back after a reboot. For the logs behind a service, pair it with journalctl.
See also the general Linux commands cheatsheet, crontab for scheduled jobs, and SSH for managing remote machines.
FAQ
What's the difference between enable and start?
start runs a service immediately but doesn't survive a reboot; enable makes it launch at boot. Use enable --now to do both at once.
How do I see why a service failed?
Run systemctl status name for a summary, then journalctl -u name for the full logs. Add -f to follow them live.