loginctl

Manage login sessions

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
loginctl list-sessionsCheck which session is which first
loginctl show-session <id>Inspect before terminating
What it does

Query and control systemd-logind: list sessions, lock/terminate sessions, enable linger.

Common flags
FlagMeaning
list-sessionsShow sessions
terminate-sessionEnd a session
terminate-userEnd all of a user’s sessions
enable-lingerLet user services run without a login
Examples
loginctl list-sessionsActive sessions · explain & risk-check →
loginctl enable-linger aliceKeep alice’s services running after logout · explain & risk-check →
Related
who systemctl
Open the full explainer →More in System & Processes

Reference text is hand-written and may be incomplete — check man loginctl for your version. Test destructive commands on a non-production system first.