whodisplay information about current users |
Command |
who [-AabdHiLlmprsTtuw] [file]
who -q [file]
who am I
who am i
who command displays information about users that are
currently logged into the system. By default, the output contains the user's
login name, terminal name, and the time at which the user logged in. Normally,
who consults the user accounting file (traditionally
/etc/utmp) for information, but you can use the file
argument to specify another accounting file (such as /etc/wtmp).
When called as:
who am i or who am I
who displays your login name, terminal, and login time.
-Adisplays all accounting entries.
-adisplays all types of entries. This is equivalent to specifying
-AbdilprTtuw.
-bdisplays all entries written at system boot time.
-ddisplays entries for processes that have died and not been restarted by a start-up process. (This is can be used when you're trying to figure out why a process died.)
-Hdisplays column headings above the output.
-idisplays idle time for users. The idle time is the
hours:minutes since the last activity; a dot (.)
means that the terminal has been used in the last minute, and the string
old means that the terminal has not been used in more than 24
hours or has not been used since boot time.
-Ldisplays terminals which are waiting for someone to log in and login daemons such as network connections.
-ldisplays terminals which are waiting for someone to log in.
-mdisplays information about current terminal only.
-pdisplays entries for processes spawned from a start-up process.
-qdisplays a quick list with the number of users and their names; other options are ignored.
-rdisplays all run-level change entries.
-sdisplays only the three fields user name, terminal, and time of entry.
-Tdisplays the state of each terminal as a plus sign (+) if
the terminal allows write access to other users, and a minus sign
(-) if write access is denied. who
displays a question mark (?) if the write access cannot be
determined.
-tdisplays all time change entries using the
date command (both old and new
time).
-udisplays only entries associated with logged-in users; each user's idle
time is also displayed. Idle time is described under
-i.
-wdisplays the terminal state; this indicates whether or not the terminal is writable.
/etc/utmpcurrent status file.
/etc/wtmpactivity history file.
0Successful completion.
2Failure because of an invalid command line option, or because of too many command line arguments.
-A, -a, -b,
-d, -H, -i,
-l, -L, -p,
-r, -s, -t,
-w, and am i options are extensions to
the POSIX standard.
The -A, -i, -L, and
-w options are extensions to the x/OPEN standard.
utmp