On modern Linux systems, systemd is the init system.
Whether you’re managing servers, debugging CI runners, or operating production hosts, systemd is the layer that:
- starts services
- supervises them
- restarts them
- logs their output
These cheatnotes focus on the commands you actually use—not every systemd feature.
Start a service:
sudo systemctl start myserviceStop a service:
sudo systemctl stop myserviceRestart a service:
sudo systemctl restart myserviceReload configuration without restarting (if supported):
sudo systemctl reload myserviceCheck status:
systemctl status myservicestatus is often the fastest way to understand what’s wrong.
Enable service at boot:
sudo systemctl enable myserviceDisable service at boot:
sudo systemctl disable myserviceEnable and start immediately:
sudo systemctl enable --now myserviceDisable and stop immediately:
sudo systemctl disable --now myserviceList active services:
systemctl list-units --type=serviceList all services (including inactive):
systemctl list-unit-files --type=serviceFilter by state:
systemctl list-units --state=failedFailed services are usually where attention is needed.
View logs for a service:
journalctl -u myserviceFollow logs in real time:
journalctl -u myservice -fView logs since boot:
journalctl -u myservice -bView logs since a time:
journalctl -u myservice --since "10 minutes ago"systemd centralizes logs—use that to your advantage.
After modifying unit files:
sudo systemctl daemon-reloadThis tells systemd to re-read unit definitions.
Forgetting this step is a common mistake.
Common unit file paths:
/etc/systemd/system/(custom overrides)/lib/systemd/system/or/usr/lib/systemd/system/(distribution-managed)
Prefer overrides in /etc to avoid conflicts with package updates.
Edit a unit override:
sudo systemctl edit myserviceThis creates a drop-in override without modifying the original file.
To edit the full unit:
sudo systemctl edit --full myserviceOverrides are safer and easier to maintain.
View dependencies:
systemctl list-dependencies myserviceUnderstanding dependencies helps diagnose startup ordering problems.
Check service state:
systemctl status myserviceInspect recent failures:
journalctl -u myservice --since "5 minutes ago"Restart and watch logs:
systemctl restart myservice
journalctl -u myservice -fMost issues reveal themselves quickly with this loop.
- Forgetting
daemon-reloadafter edits - Editing vendor unit files directly
- Ignoring journal logs
- Confusing
reloadwithrestart - Assuming a service is running because it’s enabled
systemd is explicit—trust what it tells you.
- Use
statusfirst, not guesswork - Prefer drop-in overrides
- Read logs before restarting repeatedly
- Know whether your service supports reload
- Treat systemd as your process supervisor, not just a launcher
Clarity beats cargo-cult commands.
- systemd controls service lifecycle on modern Linux
systemctlmanages state;journalctlexplains behavior- Overrides are safer than direct edits
- Logs are centralized and powerful
- A small command set covers most operational needs
Comfort with systemd turns service issues from mysterious to manageable.