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 (default is /var/adm/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.
-aUse the -b, -d, -l, -p, -r, -t, -T, and -u options.
-bReport information about the last reboot.
-dReport expired processes.
-HPrint headings.
-lReport inactive terminal lines.
-mReport only about the current terminal. Solaris only.
-n xDisplay x users per line (works only with -q).
-pReport previously spawned processes.
-q"Quick." Display only the usernames.
-rReport the run level.
-sList the name, line, and time fields (the default behavior).
-tReport the last change of the system clock (via date).
-TReport whether terminals are writable (+), not writable (-), or unknown (?).
-uReport terminal usage (idle time). A dot (.) means less than one minute idle; old means more than 24 hours idle.
am iPrint the username of the invoking user. (Similar to results from id.)
This sample output was produced at 8 a.m. on April 17:
$who -uHNAME LINE TIME IDLE PID COMMENTS martha ttyp3 Apr 16 08:14 16:25 2240 george ttyp0 Apr 17 07:33 . 15182
Since martha has been idle since yesterday afternoon (16 hours), it appears that Martha isn't at work yet. She simply left herself logged in. George's terminal is currently in use. (He likes to beat the traffic.)