WHO(1POSIX)
๐ WHO(1POSIX) โ display who is on the system ๐
okay so bestie, we're in the POSIX Programmer's Manual (the 1POSIX section, obvi) and today's main character is who. โจ
๐ข PROLOG
Okay so real talk before we even start: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ โ so like, consult the corresponding Linux manual page for the actual Linux behavior, mkay? Or, plot twist, the interface may not be implemented on Linux at all. ๐ Not me delivering bad news in paragraph one.
๐ธ NAME
who โ display who is on the system ๐ซถ
๐ SYNOPSIS
who [-mTu] [-abdHlprt] [file]
who [-mu] -s [-bHlprt] [file]
who -q [file]
who am i
who am I
look at all these little forms, it's giving choose-your-own-adventure ๐
โจ DESCRIPTION
So who shall list various pieces of information about accessible users. The "domain of accessibility" is implementation-defined, iykyk โ the standard is being mysterious on purpose.
Based on whatever options you give it, 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. It's a whole info dump, no cap. ๐
๐ OPTIONS
The who utility shall conform to the Base Definitions volume of POSIX.1โ2017, Section 12.2, Utility Syntax Guidelines. (Rules are rules, bestie.)
The following options shall be supported. The metavariables, like <line>, refer to fields described down in the STDOUT section โ so don't come for me, they're defined later. ๐
-aโ Process the implementation-defined database or named file with the-b,-d,-l,-p,-r,-t,-Tand-uoptions turned on. It's the "all of the above" option, the overachiever of the group. ๐-bโ Write the time and date of the last system reboot. The system reboot time is the time at which the implementation is able to commence running processes. It's giving "when did we last get our act together" energy. ๐-dโ Write a list of all processes that have expired and not been respawned by the init system process. The<exit>field shall appear for dead processes and contain the termination and exit values of the dead process. This can be useful in determining why a process terminated. RIP to them, but like, forensically. ๐-Hโ Write column headings above the regular output. Labeled. Organized. Iconic. โจ-lโ (The letter ell, okay, don't @ me.) List only those lines on which the system is waiting for someone to login. The<name>field shall beLOGINin such cases. Other fields shall be the same as for user entries except that the<state>field does not exist. Empty seats at the function, fr fr.-mโ Output only information about the current terminal. Just you. Main character energy, literally.-pโ List any other process that is currently active and has been previously spawned byinit.-qโ (Quick.) List only the names and the number of users currently logged on. When this option is used, all other options shall be ignored. She does not share the spotlight, periodt. ๐-rโ Write the current run-level of the init process.-sโ List only the<name>,<line>, and<time>fields. This is the default case. The bare minimum, and honestly? It's serving.-tโ Indicate the last change to the system clock. Time travel receipts. โฐ-Tโ Show the state of each terminal, as described in the STDOUT section.-uโ Writeidle time'' for each displayed user in addition to any other information. The idle time is the time since any activity occurred on the user's terminal. The method of determining this is **unspecified**. ๐ซฃ This option shall list only those users who are currently logged in. The `<name>` is the user's login name. The `<line>` is the name of the line as found in the directory `/dev`. The `<time>` is the time that the user logged in. The `<activity>` is 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 thereforecurrent''. If more than twenty-four hours have elapsed or the line has not been used since boot time, the entry shall be marked<old>. This field is useful when trying to determine whether a person is working at the terminal or not. The<pid>is the process ID of the user's login process. Basically it's the "are they actually there or just vibing" detector. ๐ต๏ธโโ๏ธ
๐ฆ OPERANDS
The following operands shall be supported:
am i,am Iโ In the POSIX locale, limit the output to describing the invoking user, equivalent to the-moption. TheamandiorImust be separate arguments. Separate. Arguments. Do not smoosh them. ๐fileโ Specify a pathname of a file to substitute for the implementation-defined database of logged-on users thatwhouses by default. Bring your own database, bestie. ๐
๐ง STDIN
Not used. She's not reading your DMs. ๐ซ
๐ INPUT FILES
None.
๐ ENVIRONMENT VARIABLES
The following environment variables shall affect the execution of who:
LANGโ Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of POSIX.1โ2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)LC_ALLโ If set to a non-empty string value, override the values of all the other internationalization variables. She said "I'm in charge now." ๐LC_CTYPEโ Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments).LC_MESSAGESโ Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.LC_TIMEโ Determine the locale used for the format and contents of the date and time strings.NLSPATHโ Determine the location of message catalogs for the processing ofLC_MESSAGES.TZโ Determine the timezone used when writing date and time information. IfTZis unset or null, an unspecified default timezone shall be used. Mysterious. We don't know where she lives. ๐
๐ ASYNCHRONOUS EVENTS
Default.
โญ STDOUT
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. So the vibe is: we know what's in it, we just don't know how it's dressed. ๐
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:
+โ The terminal allows write access to other users.-โ The terminal denies write access to other users.?โ The terminal write-access state cannot be determined.<space>โ This entry is not associated with a terminal.
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. Surprise bonus field, we don't know what it looks like. ๐
๐ STDERR
The standard error shall be used only for diagnostic messages. It's the complaint department, nothing else. ๐ข
๐ธ OUTPUT FILES
None.
๐ฆ EXTENDED DESCRIPTION
None. Nothing extra, she said what she said.
๐ EXIT STATUS
The following exit values shall be returned:
0โ Successful completion. Slay. โ>0โ An error occurred. ๐ญ
๐ CONSEQUENCES OF ERRORS
Default.
The following sections are informative.
๐ APPLICATION USAGE
The name init used for the system process is the most commonly used on historical systems, but it may vary. So like, don't be shocked if it goes by something else on your system.
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. So it could be locked down tight ๐ or it could be giving whole-network group chat energy. Both valid.
โจ EXAMPLES
None. No examples, we're just describing the vibe today. ๐ซถ
๐ง RATIONALE
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. (They almost deleted everything and then went "no wait, that's useful." Relatable honestly. ๐ญ)
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. So yeah she's niche but she's trying her best. ๐
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. It's for your eyes only, so the exact shape is whatever. ๐
The format of the terminal name is unspecified, but the descriptions of ps, talk, and write require that they use the same format. Friend group dress code. ๐ฏโโ๏ธ
It is acceptable for an implementation to produce no output for an invocation of who mil. Not me, not you, not a single line. ๐
๐ฎ FUTURE DIRECTIONS
None.
๐ SEE ALSO
mesg
The Base Definitions volume of POSIX.1โ2017, Chapter 8, Environment Variables, Section 12.2, Utility Syntax Guidelines
๐ COPYRIGHT
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 .
and that's the whole page bestie, mwah ๐ โ brought to you by IEEE/The Open Group, 2017 edition, WHO(1POSIX), and like, me. bye! ๐โจ
๐ฆ where this page comes from
- debian bookworm: manpages-posix 2017a-2 ยท Other
- debian trixie: manpages-posix 2017a-2 ยท Other
- ubuntu jammy: manpages-posix 2017a-2 ยท Other
- ubuntu noble: manpages-posix 2017a-2 ยท Other
- ubuntu resolute: manpages-posix 2017a-2build1 ยท Other
- ubuntu stonking: manpages-posix 2017a-2.1 ยท Other
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms