- NetBSD Manual Pages
WHO(1) NetBSD General Commands Manual WHO(1)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
who -- display who is logged in
who [-abdHlmqrstTuv] [file]
who am i
The who utility displays a list of all users currently logged on, showing
for each user the login name, tty name, the date and time of login, and
hostname if not local.
-a Same as --bdlprTtuv.
-b Time of last system boot (unsupported).
-d Print dead processes.
-H Write column headings above the regular output.
-l Print system login processes (unsupported).
-m Only print information about the current terminal. This is the
POSIX way of saying who am i.
-p Print active processes spawned by init(8) (unsupported).
-q ``Quick mode'': List only the names and the number of users cur-
rently logged on. When this option is used, all other options are
-r Print the current runlevel (unsupported).
-s List only the name, line and time fields. This is the default.
-T Print a character after the user name indicating the state of the
terminal line: `+' if the terminal is writable; `-' if it is not;
and `?' if a bad line is encountered.
-t Print last system clock change (unsupported).
-u Print the idle time for each user, and the associated process ID.
-v When printing of more information is requested with -u, this switch
can be used to also printed process termination signals, process
exit status, session id for windowing and the type of the entry,
see documentation of ut_type in getutxent(3).
am I Returns the invoker's real user name.
file By default, who gathers information from the file /var/run/utmpx.
An alternative file may be specified which is usually
/var/log/wtmpx (or /var/log/wtmp, or /var/log/wtmpx.[0-6] or
/var/log/wtmp.[0-6] depending on site policy as wtmpx can grow
quite large and daily versions may or may not be kept around after
compression by ac(8)). The wtmpx and wtmp file contains a record
of every login, logout, crash, shutdown and date change since wtmpx
and wtmp were last truncated or created.
If /var/log/wtmpx or /var/log/wtmp are being used as the file, the user
name may be empty or one of the special characters '|', '}' and '~'.
Logouts produce an output line without any user name. For more informa-
tion on the special characters, see utmp(5).
last(1), mesg(1), users(1), getuid(2), utmp(5), utmpx(5)
The who utility is expected to conform to IEEE Std 1003.2-1992
A who utility appeared in Version 6 AT&T UNIX.
NetBSD 4.0 September 19, 2006 NetBSD 4.0