systemd-logind is quietly controlling more of your system than you realize.
Why does closing the laptop lid suspend the system?
Why does pressing the power button shut it down?
Why do processes sometimes survive logout?
Why can applications prevent the system from sleeping?
Why does Linux provide multiple virtual terminals?
A large part of the answer is systemd-logind.
Its primary configuration file is:
/etc/systemd/logind.conf
The file controls login sessions, virtual terminals, power and sleep keys, laptop-lid events, idle actions, user-process cleanup, runtime directories, and inhibitor locks. The official systemd documentation describes logind.conf as the configuration file for the systemd login manager.
Important:
logind.confis powerful. A small configuration change can affect how a laptop sleeps, how remote sessions behave, or whether user processes survive logout. Always make a backup before modifying it.
1. What Is systemd-logind?
systemd-logind is the systemd component responsible for managing user logins and sessions.
It keeps track of things such as:
- Logged-in users
- User sessions
- Seats
- Virtual terminals
- Graphical and text sessions
- Power-button events
- Suspend/hibernate events
- Laptop-lid events
- Idle state
- User runtime directories
- Session-related cleanup
- Inhibitor locks
It also exposes this information through the systemd login manager interface, which tools such as loginctl can query and control.
Think of it as a bridge between physical hardware events, user sessions and system power management.
┌─────────────────────┐ │ Hardware │ │ │ │ Power Button │ │ Lid Switch │ │ Sleep Key │ │ Hibernate Key │ └──────────┬──────────┘ │ ▼ ┌──────────────────┐ │ systemd-logind │ └────────┬─────────┘ │ ┌───────────────┼────────────────┐ ▼ ▼ ▼ Sessions Power State Virtual TTYs │ │ │ ▼ ▼ ▼ loginctl suspend getty hibernate poweroff
2. Where Is logind.conf?
The primary administrator configuration file is:
/etc/systemd/logind.conf
Inspect it with:
sudo cat /etc/systemd/logind.conf
Or:
sudo nano /etc/systemd/logind.conf
You can also inspect the currently running logind service:
systemctl status systemd-logind
And inspect sessions:
loginctl
For more detailed information:
loginctl list-sessions
loginctl session-status
The loginctl utility is specifically intended to inspect and control the systemd login manager.



