loginctl
Control the elogind login manager
To check how many sessions are created by user
loginctl list-sessions works the same as below
Do we use X11 or Wayland
loginctl show-session $(loginctl show-user $(whoami) -p Display --value) -p Type --value
Show all properties of a session
loginctl show-session <session> -a
Show properties of a specific user
loginctl show-user <username>
Show a specific property of a user
loginctl show-user <username> -p Property
Execute on a remote host
loginctl list-users -H hostname
List users who is currently active
Log out a user from all sessions
loginctl terminate-user <username>
Dump how long time our user has been online
To check the parameters defined for the session. Below are the default settings
Show loginctl with clean output
loginctl --no-legend list-sessions
Kill user session
loginctl kill-session <session>
Kill user
loginctl kill-user <username>
Show user login status (example) where 6 is session number
loginctl session-status 6
6 - wuseman (1000)
Since: Thu 2026-01-22 20:43:08 CET; 1 day 16h ago
State: online
Leader: 3723 (login)
Seat: seat0; vc1
TTY: tty1
Remote: no
Service: login
Type: tty
Class: user
Idle: yes since Thu 2026-01-22 20:43:52 CET (1 day 16h ago)
Lock login session
loginct lock-session <session number>
Activate linger for a user (systemd only)
loginctl enable-linger myuser
Disable linger for a user (systemd only)
loginctl disable-linger myuser
Dump wich tty we are using
loginctl show-session "$(loginctl | awk 'NR==2 {print $1}')" -p Type -p Display -p TTY
Screen unlock one or more sessions

- When this happens you must go to commandline and press `ctrl+alt+ยด to be able to login from commandline and unlock the session
loginctl-unlock session <session_number_from_picture>
Show seat status
loginctl seat-status seat0
Show proertties of seats or the manager