Systemd Services Cheat Sheet

Unit files, timers, and journal troubleshooting

Last Updated: November 21, 2025

Unit Structure

Section Purpose
[Unit] Describe service + dependencies
[Service] Define command, restart, user
[Install] Set `WantedBy` for enabling

Commands

systemctl start app.service
Bring service online
systemctl enable app.service
Start on boot
systemctl status app.service
View state + journal
journalctl -u app.service -f
Stream logs

Troubleshooting

Confirm `ExecStart`, check permissions, and look for `Main PID` failures in the journal.

💡 Pro Tip: Run `systemctl daemon-reload` after editing unit files and keep logs in `journalctl -u`.
← Back to DevOps & Cloud | Browse all categories | View all cheat sheets