![Forrest logo](/images/logo.png)
loginctl:tldr:950d6
This command is used to list all the users currently logged in on a specific host (denoted by ${hostname}). Here's a breakdown of the command: - loginctl
: It is a command-line utility used to control the systemd-login manager, which manages user logins and seats on a Linux system. - list-users
: This is a subcommand of loginctl
used to display a list of currently logged-in users. - -H ${hostname}
: This option allows you to specify the target host (hostname) on which you want to check the logged-in users. The ${hostname}
placeholder should be replaced with the actual hostname or IP address of the target host. By executing this command with the appropriate hostname, you will get a list of all the users currently logged in on that specific host.