LinuxCommandLibrary

systemd-logind.service

Manage user logins and seat management

SYNOPSIS

systemd-logind.service

DESCRIPTION

The systemd-logind.service manages user logins, seats, and virtual terminals. It's a core system service responsible for keeping track of user sessions and providing facilities for managing them.

Specifically, it:

  • Manages user sessions (login, logout).
  • Controls seats (collections of input/output devices).
  • Provides an API for applications to query and control user sessions and seats.
  • Handles power management requests, such as shutdown, reboot, suspend, and hibernate (delegating to systemd's power management logic).

It utilizes the Linux kernel's cgroup (control group) mechanism to keep track of processes belonging to a user session. It implements the org.freedesktop.login1 D-Bus interface. Applications like graphical display managers (e.g., GDM, SDDM, LightDM) and terminal emulators use this interface to start and manage user sessions. Its primary role is to centralize session management, handling aspects such as tracking active sessions, managing seat assignments, and enforcing security policies related to session access.

D-BUS INTERFACE

systemd-logind exposes its functionality via the org.freedesktop.login1 D-Bus interface. This allows other applications to interact with it programmatically to manage user sessions, seats, and power management.

CONFIGURATION

systemd-logind is primarily configured through /etc/systemd/logind.conf and its drop-in directories (/etc/systemd/logind.conf.d/, /run/systemd/logind.conf.d/, /usr/lib/systemd/logind.conf.d/). These configuration files allow administrators to customize aspects of session management, such as handling idle timeouts and power management behavior.

HISTORY

systemd-logind is a relatively modern component tightly integrated with the systemd init system. Its development aimed to replace older, more fragmented approaches to session management, such as ConsoleKit. systemd-logind became prevalent as systemd gained widespread adoption, establishing a unified and reliable way to handle user sessions and related tasks.

SEE ALSO

systemd(1), loginctl(1)

Copied to clipboard