loginctl
Control the systemd login manager — manage user sessions and seats.
Synopsis
loginctl [OPTION]... COMMAND [ARG]...
Examples
loginctl list-sessions
loginctl list-users
loginctl terminate-session 42
loginctl show-session 1
Common options
| Flag | Description |
|---|---|
| list-sessions | List current sessions |
| list-users | List logged-in users |
| show-session | Show session properties |
| terminate-session | Kill a session |
| terminate-user | Kill all sessions for user |
About loginctl
The `loginctl` command control the systemd login manager — manage user sessions and seats. Service and system commands manage daemons, scheduled tasks, system boot, and shutdown operations.
Modern Linux distributions use systemd for service management, though some still support SysVinit scripts. Understanding these commands is essential for deploying and maintaining production services.
The command accepts 5 commonly used flags shown above, though the full set of options is available in the man page (`man loginctl`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More Service & System Commands
Other commands in the Service & System category