users

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 [FILE]

With no FILE argument, `users' extracts its information from the
file `/var/run/utmp'.  If a file argument is given, `users' uses that
file instead.  A common choice is `/var/run/wtmp'.

The only options are `--help' and `--version'. 

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.

Related 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
who - Print who is currently logged in
whoami - Print the current user id and name (`id -un')

Equivalent Windows NT commands:

SET USERNAME - Display current login name
NET CONFIG WORKSTATION - Display current login name
NET USER - Manage user account details



Back to the Top

Simon Sheppard
SS64.com