Name
who
Synopsis
who [options
] [file
]
Display 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 (the
default varies per system) 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.
Common Options
-H
,--heading
Print headings.
-
-m
Report only about the current terminal.
-q
,--count
“Quick.” Display only the usernames.
-s
,--short
List the name, line, and time fields (the default behavior).
-T
,--mesg
,--message
,--writable
Report whether terminals are writable (
+
), not writable (-
), or unknown (?
).-u
,--users
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.)
Solaris and GNU/Linux Options
-a
,--all
Use the
-b
,-d
,-l
,-p
,-r
,-t
,-T
, and-u
options.-b
,--boot
Report information about the last reboot.
-d
,--dead
Report expired processes.
-l
,--login
Report inactive terminal lines.
-p
,--process
Report previously spawned processes.
-r
,--runlevel
Report the run level.
-t
,--time
Report the last change of the system clock (via date).
Solaris Option
-
-n
x
Display x users per line (works only with
-q
).
GNU/Linux Options
-i
,--idle
Present idle time as
HOURS:MINUTES
,.
(dot), orold
. (Deprecated; use-u
.)-
--lookup
Use DNS to canonicalize hostnames for people ...
Get Unix in a Nutshell, 4th 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.