Re: Where does systemd-logind.service store its stats (e.g. loginctl things)?
Chris Green <[email protected]> Sat, 4 Jul 2026 15:50:39 +0100
| Newsgroups | gmane.linux.debian.user |
|---|---|
| Organization | linux.* mail to news gateway |
| Message-ID | <[email protected]> |
Greg Wooledge <[email protected]> wrote: > 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 > Yes, I've looked at that too. Most of those locations aren't really suitable (obviously the /run ones aren't) but I looked anyway and there's nothing of much use. > 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/. There's no /etc/systemd/logind.conf.d directory on my systems where I have I have set enable-linger. For the other:- root@tackpi:~# grep -r '\[login\]' /etc root@tackpi:~#