who - who is on the system
who [-abdHlmpqRrstTu] [utmp_file]
who -q [-n x] [utmp_file]
who [am i]
who [am I]
The who command, without an argument, lists the login name,
terminal name, and login time for each current user.
Without an argument, who examines the /var/run/utmp
file to obtain its information. If a utmp_file is given, that file is
examined. Typically the given file will be /var/log/wtmp, which
contains a record of all the logins since it was created. Then who
lists logins, logouts and crashes since the creation of the wtmp file. Each
login is listed with user name, terminal name (with `/dev/'
suppressed), and date and time.
With the two-argument synopsis forms `who am i' and `who
am I', who tells who you are logged in as.
The who command accepts the following options:
- -a
- Same as -bdlprtTu.
- -b
- Writes reboot records.
- -d
- Writes records about dead processes along with their termination and exit
values.
- -H
- Causes column headings to be printed in the first line.
- -l
- Writes records about lines on which the system is waiting for someone to
login.
- -m
- Outputs only records about the current terminal, as `who am I'
does.
- -n number
- Sets the number of columns for the -q option.
- -p
- Lists records about other processes currently active that have been
spawned by init.
- -q
- Quick output format. For each login record, the user name is printed. All
other options are ignored.
- -R
- Adds the host name field to the output.
- -r
- Writes the current run-level of the init process.
- -s
- Omits idle time and login process ID (default).
- -t
- Writes records concerning system time changes.
- -T
- Shows write access to the user's terminal (see mesg(1): `+'
if writing is permitted, `-' if writing is denied, and `?'
if the status cannot be determined. For /usr/5bin/who and
/usr/5bin/s42/who, -u is implied.
- -u
- Adds idle time (the time since the last keypress on the terminal) and
login process ID to the output. A terminal that has not been accessed for
24 hours is considered `old'; a terminal that has been accessed
within the last minute is marked with a dot `.'.
mesg(1), utmp(5), init(8)