Print login names of users currently logged in, print on a single line a blank-separated list of user names of users currently logged in to the current host.
Syntax users [OPTION]... [FILE] Key --help display this help and exit --version output version information and exit
With no FILE argument, 'users' will by default extract the user information from the file /var/run/utmp
If a FILE argument is given, 'users' uses that file instead. A common choice is /var/log/wtmp
Each user name corresponds to a login session, so if a user has more than one login session, that user's name will appear the same number of times in the output.
“For solving a surprisingly large and varied number of problems, crowds are smarter than individuals” ~ Michael Shermer
Related linux commands:
groups - Print group names a user is in.
hostname - Print or set system name.
id - Print user and group id's.
logname - Print current login name.
printenv - Print environment variables.
uname - Print system information.
w - Show who is logged on and what they are doing.
who - Print who is currently logged in.
whoami - Print the current user id and name ('id -un').
Equivalent Windows commands: Get-adUser