About

About

Copy-paste systemd unit files — by someone who got tired of re-reading man systemd.service for the same five directives.

systemd is the init system on virtually every modern Linux distribution, and it does far more than start daemons: it schedules jobs (timers), mounts filesystems, watches paths, activates services on demand (sockets), and sandboxes processes. But the exact directive — Restart=on-failure, the OnCalendar= syntax, the rule that a .mount file must be named after its path — is easy to forget between uses. This site collects the units that actually come up into one library.

Each recipe is a complete, working unit file with a short explanation of every important line, the daemon-reload / enable --now commands to apply it, how to verify it, and the common gotchas. Recipes target modern systemd (v240+) as shipped on current Debian/Ubuntu, RHEL/Fedora, Arch, and SUSE; where a directive is newer, the recipe says so.

Topics: services (run at boot, auto-restart, run as a user, environment, oneshot, dependencies, user units), timers (every 5 minutes, daily, on-boot, randomized), mounts (NFS/CIFS, automount, bind), path units, socket activation, hardening, and the systemctl/journalctl commands to manage it all.