who

display information about current users

Command


SYNOPSIS

who [-AabdHiLlmprsTtuw] [file]

who -q [file]

who am I

who am i


DESCRIPTION

The 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.

Options

-A

displays all accounting entries.

-a

displays all types of entries. This is equivalent to specifying -AbdilprTtuw.

-b

displays all entries written at system boot time.

-d

displays 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.)

-H

displays column headings above the output.

-i

displays 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.

-L

displays terminals which are waiting for someone to log in and login daemons such as network connections.

-l

displays terminals which are waiting for someone to log in.

-m

displays information about current terminal only.

-p

displays entries for processes spawned from a start-up process.

-q

displays a quick list with the number of users and their names; other options are ignored.

-r

displays all run-level change entries.

-s

displays only the three fields user name, terminal, and time of entry.

-T

displays 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.

-t

displays all time change entries using the date command (both old and new time).

-u

displays only entries associated with logged-in users; each user's idle time is also displayed. Idle time is described under -i.

-w

displays the terminal state; this indicates whether or not the terminal is writable.


FILES

/etc/utmp

current status file.

/etc/wtmp

activity history file.


DIAGNOSTICS

Possible exit status values are:
0

Successful completion.

2

Failure because of an invalid command line option, or because of too many command line arguments.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0.

The -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.


SEE ALSO

Commands:

File Formats:
utmp


Updated MKS Toolkit [3khat16.ico]HP3000 [3khat16.ico]3kMail [archive16.gif]