On Sat, Jul 04, 2026 at 12:49:40 +0100, Chris Green wrote:
> This is more out of interest than necessity but I'd like to know where
> systemd-logind.service stores its persistent data. E.g. in particular
> when I run 'loginctl enaable-linger chris' where is the required flag
> set?
>
> It must be a persistent location as 'enable-linger' obviously survives
> a reboot, but I just can't find where it is.
I looked at the SEE ALSO section of loginctl(1), and it refers to
logind.conf(5). It also says "See also KillUserProcesses= setting in
logind.conf(5)." in the description of the enable-linger option.
logind.conf(5) says
/etc/systemd/logind.conf
/run/systemd/logind.conf
/usr/local/lib/systemd/logind.conf
/usr/lib/systemd/logind.conf
/etc/systemd/logind.conf.d/*.conf
/run/systemd/logind.conf.d/*.conf
/usr/local/lib/systemd/logind.conf.d/*.conf
/usr/lib/systemd/logind.conf.d/*.conf
It also says that KillUserProcess= is an option, and that all options
can be configured "in the [Login] section".
So, I would check to see whether something has been created in the
/etc/systemd/logind.conf.d/ directory. Failing that, I would look
for "[Login]" as a literal string in any file under /etc/.