


      WHO(1)                      (UNIX 5.2)                     WHO(1)



      NAME
           who - who is on the system

      SYNTAX
           who [-uTHlpdbrtasq] [ file ]

           who am i

           who am I

      DESCRIPTION
           Who can list the user's name, terminal line, login time,
           elapsed time since activity occurred on the line, and the
           process-ID of the command interpreter (shell) for each
           current UNIX 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.

           Who with the am i or am I option identifies the invoking
           user.

           Except for the default -s option, the general format for
           output entries is:

                name [state] line time activity pid [comment] [exit]

           With options, who can list logins, current run-level,
           reboots, and changes to the system clock, as well as other
           processes spawned by the init process.  These options are:

           -u    lists currently logged-in users only.  The output name
                 is the user's login name.  The line is the name of the
                 line as found in the /dev directory.  Time is when the
                 user logged in.  Activity (WHICH IS NOT CURRENTLY
                 IMPLEMENTED) gives the number of hours and minutes
                 since activity last occurred on that line.  A dot (.)
                 indicates that the terminal has seen activity in the
                 last minute and is therefore ``current''.  If more
                 than twenty-four hours have elapsed or the line has
                 not been used since boot time, the entry is marked
                 old.  This field is useful when trying to determine
                 whether a person is working at the terminal.  The pid
                 is the process-ID of the user's shell.  The comment is
                 the comment field associated with this line as found
                 in /etc/inittab (see inittab(4)).  This can contain
                 information about where the terminal is located, the
                 telephone number of the dataset, type of terminal if
                 hard-wired, etc.

           -T    This option is the same as the -u option, except that
                 the state of the terminal line is printed.  The state



      Page 1                                          (73 A2 02MT REV1)






      WHO(1)                      (UNIX 5.2)                     WHO(1)



                 describes whether someone else can write to that
                 terminal.  A + appears if the terminal is writable by
                 anyone; a - appears if it is not.  Root can write to
                 all lines having a + or a - in the state field.  If a
                 bad line is encountered, a ? is printed.

           -l    This option lists only those lines on which the system
                 is waiting for someone to login.  The name field is
                 LOGIN in such cases.  Other fields are the same as for
                 user entries except that the state field does not
                 exist.

           -H    This option will print column headings above the
                 regular output.

           -q    This is a quick who, displaying only the names and the
                 number of users currently logged on.  When this option
                 is used, all other options are ignored.

           -p    This option lists any other process which is currently
                 active and has been previously spawned by init.  The
                 name field is 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).





























      Page 2                                          (73 A2 02MT REV1)






      WHO(1)                      (UNIX 5.2)                     WHO(1)



           -d    This option displays all processes that have expired
                 and not been respawned by init.  The exit field
                 appears for dead processes and contains the
                 termination and exit values (as returned by wait(2)),
                 of the dead process.  This can be useful in
                 determining why a process terminated.

           -b    This option indicates the time and date of the last
                 reboot.

           -r    This option indicates the current run-level of the
                 init process.

           -t    This option indicates the last change to the system
                 clock (via the date(1) command) by root.  See su(1).

           -a    This option processes /etc/utmp or the named file with
                 all options turned on.

           -s    This option is the default and lists only the name,
                 line, and time fields.

      FILES
           /etc/utmp
           /etc/wtmp
           /etc/inittab

      SEE ALSO
           date(1), init(1), login(1), mesg(1), su(1), wait(2),
           inittab(4), utmp(4).

























      Page 3                                          (73 A2 02MT REV1)



