Copy · paste · systemctl enable --now

systemd unit files you can actually paste.

Complete .service, .timer, .mount, .path and .socket recipes — auto-restart a crashing service, run at boot, replace cron with a timer, auto-mount a share, watch a folder, socket-activate, and harden a service — each with the exact enable and verify commands.

18 recipes

You know systemd can do it. You don't remember the exact directive.

Each recipe is a focused, copy-paste unit file for a real task, with a one-line explanation, the enable/verify commands, and the gotchas.

FAQ

Are these systemd unit files free?

Yes. Every recipe is free to read and copy, with no account or paywall.

Where do I put a unit file?

System units in /etc/systemd/system/, user units in ~/.config/systemd/user/. Then daemon-reload and enable --now.

Do I need root?

System units yes (sudo). User units (systemctl --user) need no root; use loginctl enable-linger to keep them after logout.

Why a timer instead of cron?

Timers log to the journal, list with systemctl list-timers, catch up missed runs (Persistent=true), and jitter across a fleet. The 5-minute recipe replaces a */5 cron entry.

Open the full interactive site ↗