*** Welcome to piglix ***

Who (Unix)


The standard Unix command who displays a list of users who are currently logged into the computer.

The who command is related to the command w, which provides the same information but also displays additional data and statistics.

The Single Unix Specification (SUS) specifies that who should list information about accessible users. The XSI extension also specifies that the data of the username, terminal, login time, process ID, and time since last activity occurred on the terminal, furthermore, an alternate system database used for user information can be specified as an optional argument to who.

The command can be invoked with the arguments am i or am I (so it is invoked as who am i or who am I), showing information about the current terminal only (see the command tty and the -m option below, of which this invocation is equivalent).

The SUS without extensions only specifies the following -m, -T, and -u options, all other options are specified in the XSI extension.

Other Unix and Unix-like operating systems may add extra options. GNU who includes a -i option behaving similarly to -u and a -w option displaying whether the user listed accepts messages (the SUS displays this when -T is specified), yet GNU who and BSD who both omit a number of the above options (such as -a, -b, -d, and others); GNU who instead uses -l to perform DNS lookups on hostnames listed.

The SUS without extensions specifies that the output format is to be "implementation-defined". The XSI extension specifies a format, but notes that it is not fully specified; delimiters and field lengths are not precisely specified. Thus, the format of the output differs considerably among Unix implementations.


...
Wikipedia

...