SYSTEMD-LOGIND.SERVICE(8)

๐Ÿ’– SYSTEMD-LOGIND.SERVICE(8) ๐Ÿ’–

okay bestie, sit down, hydrate, and let me tell you about systemd-logind.service / systemd-logind โ€” the Login manager ๐Ÿ’… (yes that's the NAME section, we're doing this properly)


โœจ SYNOPSIS โœจ

systemd-logind.service

/usr/lib/systemd/systemd-logind

๐ŸŒธ DESCRIPTION ๐ŸŒธ

so. systemd-logind is a system service that manages user logins. it's the main character of logins, no cap. here's everything it's responsible for, and I mean everything, we're not skipping a single one:

  • keeping track of users and sessions, their processes, and their idle state. and how does it do that? it allocates a systemd slice unit for each user below user.slice, plus a scope unit below that for each concurrent session of a user. ALSO, a per-user service manager gets started as a system service instance of user@.service for each logged-in user. yes, that's a lot. she's organized. ๐Ÿ”ฅ
  • generating and managing session IDs. if auditing is available and an audit session ID is already set for a session, then that ID gets reused as the session ID. otherwise, an independent session counter is used. either way, you're getting an ID, bestie. ๐Ÿ’–
  • providing polkit[1]-based access for users for operations such as system shutdown or sleep ๐Ÿ›Œ
  • implementing a shutdown/sleep inhibition logic for applications ๐Ÿšซ
  • handling of power/sleep hardware keys โŒจ๏ธ
  • multi-seat management ๐Ÿช‘
  • session switch management ๐Ÿ”„
  • device access management for users ๐Ÿ”Œ
  • automatic spawning of text logins (gettys) on virtual console activation and user runtime directory management ๐Ÿ–ฅ๏ธ
  • scheduled shutdown โฐ
  • sending "wall" messages ๐Ÿ“ข

user sessions are registered with logind via the pam_systemd(8) PAM module. that's the plug-in that connects your login to the vibe.

see logind.conf(5) for information about the configuration of this service. ๐Ÿ‘‘

see sd-login(3) for information about the basic concepts of logind such as users, sessions and seats. (iykyk)

see org.freedesktop.login1(5) and org.freedesktop.LogControl1(5) for information about the D-Bus APIs systemd-logind provides. ๐Ÿฆ‹

in addition to the D-Bus interface, systemd-logind also provides a Varlink interface io.systemd.Shutdown for shutting down or rebooting the system. it supports PowerOff, Reboot, Halt, KExec, and SoftReboot methods. each method accepts an optional skipInhibitors boolean parameter to bypass active block inhibitors (matching the SD_LOGIND_SKIP_INHIBITORS flag of the D-Bus interface). and if you wanna peek at it, the interface can be queried with varlinkctl introspect /run/systemd/io.systemd.Login io.systemd.Shutdown. periodt. โœจ

for more information see Inhibitor Locks[2]. ๐Ÿ”’

if you are interested in writing a display manager that makes use of logind, please have look at Writing Display Managers[3]. if you are interested in writing a desktop environment that makes use of logind, please have look at Writing Desktop Environments[4]. go build something iconic, babe ๐ŸŽ€


๐Ÿ’… SIGNAL ๐Ÿ’…

  • SIGHUP โ€” reloads the service configuration file. that's it. that's the whole section. short queen. ๐Ÿ‘‘

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

systemd(1), systemd-user-sessions.service(8), loginctl(1), logind.conf(5), pam_systemd(8), sd-login(3), org.freedesktop.login1(5)


๐ŸŽ€ NOTES ๐ŸŽ€

  1. polkit https://www.freedesktop.org/wiki/Software/polkit
  2. Inhibitor Locks https://systemd.io/INHIBITOR_LOCKS
  3. Writing Display Managers https://systemd.io/WRITING_DISPLAY_MANAGERS
  4. Writing Desktop Environments https://systemd.io/WRITING_DESKTOP_ENVIRONMENTS

and that's the whole page, bestie, we ate and left no crumbs ๐Ÿ“ this was systemd 262.1, dated SYSTEMD-LOGIND.SERVICE(8) โ€” log off and touch some grass, but like, through logind, obviously ๐Ÿ’œโœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms