[Previous] [Contents] [Next]

who

Display who is on the system (POSIX)

Syntax:

who [-aimow] [-n node]

Options:

-a
Get information on all users on the network.
-i
Output the user's input "idle time" in addition to any other information. The idle time is the time since any input occurred on the user's terminal. This is the default option.
-m
(me) Output information only about the current terminal.
-n node
Get who information from the specified node. The default is the local node.
-o
Output the user's output "idle time" in addition to any other information. The output idle time is the time since any output occurred to the user's terminal.
-w
Show the state of each terminal in the who output as the + character if the terminal allows write access to other users and as the - character if such access is denied. The ? character is printed if for some reason the information can't be determined.

Description:

The who utility lists various pieces of information about any accessible users.

If you don't specify any options, the default output includes the user's login name, terminal name, time at which the user logged in, input idle time, and the command being run.

If an idle time is reported as dashes, then no input (output) occurred.

Examples:

Display users on the current node:

    who

Display information about me:

    who -m

Display all users on the network:

    who -a

Exit status:

0
Successful completion.
>0
An error occurred.

Caveats:

When reporting on the command being executed, the who utility assumes the deepest program in the process tree with the same process group number as the session leader.

See also:

login


[Previous] [Contents] [Next]