Name
who
Synopsis
who [options
] [file
]
Displays information about the current status of the system. With no
options, lists 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;
old
means 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 1:55 p.m. on January 15:
$ who -uH
USER LINE WHEN IDLE FROM
chuck console Jan 14 19:55 18:01
chuck ttyp1 Jan 15 13:11 .
chuck ttyp2 Jan 15 13:55 .
The output shows that the user chuck
has been idle
for 18 hours and 1 minute (18:01, under the IDLE column).
Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.