Manage Your Own Services with systemctl --user

systemd runs a per-user service manager: units in ~/.config/systemd/user/ can start at login without sudo.

LinuxservicesusersystemdMedium risk
Run `systemctl --user enable --now myapp.service` to enable and start a user-level service.

01Command

Command
$ systemctl --user enable --now myapp.service

02What it does

User unit files live in ~/.config/systemd/user/ (system-wide per-user ones in /etc/systemd/user/), and `systemctl --user daemon-reload` picks up new files. By default user services die when you log out of all sessions; run `sudo loginctl enable-linger $USER` to keep them running in the background like a daemon. Common use cases: syncthing, podman containers, and notification daemons.

03Risk

RiskMedium risk
Requirementssystemd-based distribution; XDG_RUNTIME_DIR set (default on desktop Linux)

04Undo

Undo
$ systemctl --user disable --now myapp.service

05Sources

  • systemctl(1) - Linux manual page
    Ubuntu Manpages · technical · 2026-09-17
    Evidence: The --user option talks to the service manager of the calling user rather than the system manager.
  • systemd/User - ArchWiki
    ArchWiki · community · 2026-09-17
    Evidence: Documents the systemd user instance, unit placement in ~/.config/systemd/user/, and loginctl enable-linger for running services without an active session.

Last verified: 2026-09-17 · Category: System & Settings

06Related solutions