who(1)who(1)Namewho - print who and where users are logged in
Syntaxwho [who-file] [am i]
Description
The command, without an argument, lists the login name, terminal name,
and login time for each current UNIX user.
Without an argument, examines the /etc/utmp file to obtain its informa‐
tion. If a file is given, that file is examined. Typically the given
file will be /usr/adm/wtmp, which contains a record of all the logins
since it was created. Then lists logins, logouts, and crashes since
the creation of the wtmp file. Each login is listed with user name,
terminal name (with /dev/ suppressed), and date and time. When an
argument is given, logouts produce a similar line without a user name.
Reboots produce a line with `~' in the place of the device name, and a
fossil time indicative of when the system went down.
With two arguments, as in `who am I' (and also `who are you'), tells
who you are logged in as.
Files
/etc/utmp
See Alsogetuid(2), utmp(5)who(1)