Skip to main content
p. 188

7.8 Timer Units Running as Regular Users

All of the systemd timer units we’ve seen so far have been run as root. It’s also possible to create a timer unit as a regular user. To do this, add the --user option to systemd-run.

However, if you log out before the unit runs, the unit won’t start; and if you log out before the unit completes, the unit terminates. This happens because systemd has a user manager associated with a logged-in user, and this is necessary to run timer units. You can tell systemd to keep the user manager around after you log out with this command:

$ loginctl enable-linger

As root, you can also enable a manager for another user:

# loginctl enable-linger user