I know that loginctl enable-linger <user> and loginctl disable-linger <user> can be used to enable/disable linger for a user, and the status shown with loginctl show-user <user> (Linger=<yes/no>).

I also know that these (at least at the time of writing) work by manipulating /var/lib/systemd/linger/<user>, and that loginctl has some configuration in /etc/systemd/logind.conf (or [...].d/*.conf).

However, all the configuration options mentioned in man 5 logind.conf seem to be 'global' options, not including Linger; is there no file-based (in /etc or similar rather than /var) way to set the linger option for a user?

2 Answers 2


The equivalent of loginctl enable-linger <user> in /etc/systemd/logind.conf would be KillExcludeUsers

from logind.conf(5):

These settings take space-separated lists of usernames that override the KillUserProcesses= setting. A user name may be added to KillExcludeUsers= to exclude the processes in the session scopes of that user from being killed even if KillUserProcesses=yes is set.


loginctl enable-linger <user> does permanently enable it even across reboots. You can verify with ls /var/lib/systemd/linger/ which lists all users where linger is enabled (filename == username). One of the tasks for loginctl is to create/remove the file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .