WHO(1) — User’s Manual — Commands
NAME
who − who is on the system
SYNOPSIS
who [ who-file ] [ am i ]
DESCRIPTION
Used without arguments, who lists the login name, terminal name, and login time for each current UNIX user. Who gets this information from the /etc/utmp file.
If a filename argument is given, the named file is examined instead of /etc/utmp. Typically the named file is /usr/adm/wtmp, which contains a record of all logins since it was created. In this case, who lists logins, logouts, and crashes. Each login is listed with user name, terminal name (with ‘/dev/’ suppressed), and date and time. Logouts produce a similar line without a user name. Reboots produce a line with ‘~’ in place of the device name, and a fossil time indicating when the system went down. Finally, the adjacent pair of entries ‘|’ and ‘}’ indicate the system-maintained time just before and after a date command changed the system’s idea of the time.
With two arguments, as in ‘who am i’ (and also ‘who are you’), who tells who you are logged in as: it displays your hostname, login name, terminal name, and login time.
EXAMPLES
angel% who am i
angel!henryttyp0Apr 27 11:24
angel%
krypton% who
mktg ttym0Apr 27 11:11
shannon ttyp0Apr 27 11:25
henry ttyp1Apr 27 11:30
krypton%
FILES
/etc/utmp
SEE ALSO
whoami(1), getuid(2), utmp(5), w(1)
Sun System Release 1.0 — 6 July 1983