Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

date(1)

login(1)

mesg(1)

ps(1)

su(1)

users(1)

w(1)

whoami(1)

wait(2)

inittab(4)

utmp(4)

init(1M)




who(1) who(1)
NAME who - reports users who are currently logged in to the system SYNOPSIS who [-a] [-b] [-d] [-H] [-l] [-p] [-s] [-t] [-T] [-u] [file] who -r [-d] [-l] [-p] [-u] [file] who -q [file] who am i who am I ARGUMENTS -a Processes /etc/utmp or the file specified by the file argument, with all options turned on. -b Indicates the time and date of the last reboot. -d Displays all processes that have expired and have not been respawned by init. file Specifies the file to be examined. Usually, file is /etc/wtmp which contains a history of all the logins since the file was last created. -H Prints column headings above the regular output. -l Lists only those lines on which the system is waiting for someone to log in. The name field (described in the ``Description'' later in this manual page) contains LOGIN in such cases. Other fields are the same as for user entries except that the state field does not exist. -p Lists any non-getty process that is currently active and has been previously spawned by init. The name field contains the name of the program executed by init as found in /etc/inittab. The state, line, and activity fields have no meaning. The comment field shows the id field of the line from /etc/inittab that spawned this process. See inittab(4). The exit field appears for dead processes and contains the termination and exit values (as returned by wait(2)) of the dead process. This option can be useful in determining why a process terminated. -q Displays only the names and the number of users currently logged in. When this option is used, all other options are ignored. January 1992 1



who(1) who(1)
-r Indicates the current run-level of the init process as part of an expanded listing of the system status. If the run-level shown is 2, then the system is currently running in multi-user mode. -s Lists only the name, line, time, and remote host (if any) fields. This option is the default. -t Indicates the last change to the system clock (by means of the date(1) command) by a user logged in as root. See su(1). -T Does the same thing as the -u option, and also prints the state field of the terminal line. The state field describes whether someone else can write to that terminal. A + appears if the terminal is writable by anyone; a - appears if it is not. A user logged in as root can write to all lines having a + or a - in the state field. If a bad line is encountered, a ? is printed. -u Lists only those users who are currently logged in. The name field contains the user's login name. The line field contains the name of the line as found in the directory /dev. The time field contains the time that the user logged in. The activity field contains the number of hours and minutes since activity last occurred on that particular line. A dot (.) indicates that the terminal has seen activity in the last minute and is therefore ``current.'' If more than 24 hours have elapsed or the line has not been used since boot time, the entry is marked old. This field is useful when you are trying to determine whether a person is working at the terminal or not. The pid field contains the process ID of the user's shell. The comment field contains the comment field associated with this line as found in /etc/inittab (see inittab(4)). This field can contain information about where the terminal is located, the telephone number of the dataset, the type of terminal if hard-wired, and so on. DESCRIPTION who can list the user's login name, the terminal line, the login time, the elapsed time since activity occurred on the line, and the process ID of the command interpreter (shell) for each current A/UX system user. It examines the /etc/utmp file to obtain its information. If file is given, that file is examined. Usually, file will be /etc/wtmp, which contains a history of all the logins since the file was last created. 2 January 1992



who(1) who(1)
If the who command is issued with am i or am I at the end, the command identifies the invoking user. Except for the default -s option, the general format for output entries is as follows: name [state] line time activity pid [comment] [exit] With options, who can list logins, logoffs, reboots, and changes to the system clock, as well as other processes spawned by the init process. EXAMPLES The following command reports the name under which you are currently logged in. who am i FILES /bin/who Executable file /etc/inittab Initialization table file /etc/utmp Temporary file /etc/wtmp Temporary file SEE ALSO date(1), login(1), mesg(1), ps(1), su(1), users(1), w(1), whoami(1) wait(2), inittab(4), utmp(4) in A/UX Programmer's Reference init(1M) in A/UX System Administrator's Reference January 1992 3

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026