WHO(1P) | POSIX Programmer's Manual | WHO(1P) |
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
who — display who is on the system
who [-mTu] [-abdHlprt] [file]
who [-mu] -s [-bHlprt] [file]
who -q [file]
who am i
who am I
The who utility shall list various pieces of information about accessible users. The domain of accessibility is implementation-defined.
Based on the options given, who can also 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 for each current system user.
The who utility shall conform to the Base Definitions volume of POSIX.1‐2017, Section 12.2, Utility Syntax Guidelines.
The following options shall be supported. The metavariables, such as <line>, refer to fields described in the STDOUT section.
The following operands shall be supported:
Not used.
None.
The following environment variables shall affect the execution of who:
Default.
The who utility shall write its default format to the standard output in an implementation-defined format, subject only to the requirement of containing the information described above.
XSI-conformant systems shall write the default information to the standard output in the following general format:
<name>[<state>]<line><time>[<activity>][<pid>][<comment>][<exit>]
For the -b option, <line> shall be "systemboot". The <name> is unspecified.
The following format shall be used for the -T option:
"%s %c %s %s\n" <name>, <terminal state>, <terminal name>,
<time of login>
where <terminal state> is one of the following characters:
In the POSIX locale, the <time of login> shall be equivalent in format to the output of:
date +"%b %e %H:%M"
If the -u option is used with -T, the idle time shall be added to the end of the previous format in an unspecified format.
The standard error shall be used only for diagnostic messages.
None.
None.
The following exit values shall be returned:
Default.
The following sections are informative.
The name init used for the system process is the most commonly used on historical systems, but it may vary.
The ``domain of accessibility'' referred to is a broad concept that permits interpretation either on a very secure basis or even to allow a network-wide implementation like the historical rwho.
None.
Due to differences between historical implementations, the base options provided were a compromise to allow users to work with those functions. The standard developers also considered removing all the options, but felt that these options offered users valuable functionality. Additional options to match historical systems are available on XSI-conformant systems.
It is recognized that the who command may be of limited usefulness, especially in a multi-level secure environment. The standard developers considered, however, that having some standard method of determining the ``accessibility'' of other users would aid user portability.
No format was specified for the default who output for systems not supporting the XSI option. In such a user-oriented command, designed only for human use, this was not considered to be a deficiency.
The format of the terminal name is unspecified, but the descriptions of ps, talk, and write require that they use the same format.
It is acceptable for an implementation to produce no output for an invocation of who mil.
None.
mesg
The Base Definitions volume of POSIX.1‐2017, Chapter 8, Environment Variables, Section 12.2, Utility Syntax Guidelines
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
2017 | IEEE/The Open Group |