Frequently Asked Question

What is systemd-logind and what does it manage?

systemd-logind is the session and seat manager. Every time someone logs in, at a virtual console, through SSH, through a graphical display manager, logind creates a session tracking the login, and it groups sessions belonging to one physical workstation into a seat. It hands out access to seat-bound hardware (the framebuffer, keyboards, input devices) to whichever session currently owns the seat, mediates switching between virtual terminals, and handles power-button and lid-close events through configurable polkit-aware policies.

The user-facing tool is loginctl: loginctl list-sessions, loginctl enable-linger <user> (let a user's services keep running after logout), and loginctl terminate-session are the common ones. On a desktop, logind is the bridge between the graphical environment and the rest of systemd; on a headless server it is mostly invisible but still tracks SSH sessions so they can be killed cleanly on shutdown.

Further reading and video