About the systemd cheat sheet
systemd is two tools in practice: systemctl for managing units and journalctl for reading what they did. Most day-to-day work is starting, stopping, enabling and inspecting services, and the distinction between starting and enabling catches people out — one affects now, the other affects boot.
Unit files should rarely be edited in place. Packages install units under the system directory, and your changes there will be overwritten on upgrade. Drop-in overrides let you change specific directives while inheriting the rest, and they survive package updates, which is why they are the correct way to customise a shipped unit.
journalctl is where the answers are, and its filters are what make it usable. Filtering by unit, by boot, by time window and by priority turns an unreadable firehose into the ten lines that matter. Following a specific unit's log while restarting it is the fastest way to diagnose a service that will not start.
Frequently asked questions
What is the difference between start and enable?
Start runs the service now and does nothing about boot. Enable creates the symlinks that make it start at boot and does nothing right now. Forgetting to enable is why a service works after manual intervention and disappears after a reboot — a failure mode that surfaces weeks later at the worst time.
How do I change a unit shipped by a package?
Use an override rather than editing the file. The edit subcommand creates a drop-in that layers on top of the packaged unit, so you change only the directives you care about and the rest survives upgrades. To clear a list-valued directive before setting it, assign it an empty value first, otherwise your entry is appended rather than replacing.
Why is my service failing to start with no useful error?
Read the journal for that specific unit rather than the status output, which truncates. Filtering by unit and following while you restart shows the full output including anything the process wrote before dying. Check the exit code too — systemd reports it, and it often identifies the failure faster than the logs do.
How do timers compare to cron?
Timers are units, so they get the same logging, dependency handling and resource control as services, and journalctl shows the run history. With `Persistent=true` they also run a missed job on the next boot, which plain cron does not. The cost is more configuration for a simple schedule — two files instead of one line.
How do I stop the journal filling the disk?
Set retention limits by size or time in the journald configuration, or vacuum existing logs down to a size or age. On a machine with persistent storage, an unbounded journal will eventually consume the disk. This is worth setting deliberately at build time rather than discovering under pressure.