Frequently Asked Question

What is the difference between system units and user units (systemctl --user)?

Every systemd machine actually has two instances of systemd. The system instance runs as PID 1 and manages services that affect the whole machine, web servers, databases, networking, mounts. The user instance is a separate systemd process started for each logged-in user; it manages units owned by that user and runs without root privileges. You talk to the system instance with systemctl and to your own user instance with systemctl --user.

User units live under ~/.config/systemd/user/ (for things you write yourself) and /usr/lib/systemd/user/ (for packages). They are useful for personal scheduled tasks, desktop helpers, syncthing or rclone agents, and small applications that should run as you rather than as root. By default a user's units stop when the last login session ends; loginctl enable-linger <user> allows them to keep running after logout, which is what you want for, say, an SSH server's user-owned services on a workstation.

Further reading and video