commands.sh

loginctl

linux

Manage the systemd login manager. See also: `lslogins`.

More info →

Options (4)

-a, --allboolean

Print all properties of a specific session

Example: loginctl show-session {{session_id}} {{[-a|--all]}}
-p, --propertyboolean

Print a specific property of a user

Example: loginctl show-user {{username}} {{[-p|--property]}} {{property_name}}
-H, --hostboolean

Execute a `loginctl` operation on a remote host

Example: loginctl list-users {{[-H|--host]}} {{hostname}}
-h, --helpboolean

Display help

Example: loginctl {{[-h|--help]}}

Examples (7)

Print all current sessions

Print all properties of a specific session

loginctl show-session session_id [-a|--all]

Print all properties of a specific user

loginctl show-user username

Print a specific property of a user

loginctl show-user username [-p|--property] property_name

Execute a `loginctl` operation on a remote host

loginctl list-users [-H|--host] hostname

Log a user out on all of their sessions

loginctl terminate-user username

Display help

loginctl [-h|--help]
made by @shridhargupta | data from tldr-pages