Name
who
Synopsis
who [options] [file]
Displays information about the current status of the system. With no
options, list the names of users currently logged in to the system.
An optional system file (default is
/var/run/utmp) can be supplied to give
additional information. who is usually invoked
without options, but useful options include am
i and -u. For more examples,
see cut, line,
paste, tee, and
wc.
Options
-
-H Print headings.
-
-m Report only about the current terminal.
-
-T Report whether terminals are writable (
+), not writable (-), or unknown (?).-
-u Report terminal usage (idle time). A dot (.) means less than one minute idle;
oldmeans more than 24 hours idle.-
am i Print the username of the invoking user. (Similar to results from
id.)
Example
This sample output was produced at 8 a.m. on April 17:
% who -uH
NAME LINE TIME IDLE PID COMMENTS
martha ttyp3 Apr 16 08:14 16:25 2240
george ttyp0 Apr 17 07:33 . 15182The output shows that the user martha has beenidle
for 16 hours and 25 minutes (16:25, under the IDLE column).