display information about current users 



who [-AabdHiLlmprsTtuw] [file]

who -q [file]

who am I

who am i


The who command displays information about users that are currently logged into the system. By default, the output contains the user's login name, terminal name, and the time at which the user logged in. Normally, who consults the user accounting file (traditionally /etc/utmp) for information, but you can use the file argument to specify another accounting file (such as /etc/wtmp).

When called as:

who am i or who am I

who displays your login name, terminal, and login time.



displays all accounting entries.


displays all types of entries. This is equivalent to specifying -AbdilprTtuw.


displays all entries written at system boot time.


displays entries for processes that have died and not been restarted by a start-up process. (This is can be used when you're trying to figure out why a process died.)


displays column headings above the output.


displays idle time for users. The idle time is the hours:minutes since the last activity; a dot (.) means that the terminal has been used in the last minute, and the string old means that the terminal has not been used in more than 24 hours or has not been used since boot time.


displays terminals which are waiting for someone to log in and login daemons such as network connections.


displays terminals which are waiting for someone to log in.


displays information about current terminal only.


displays entries for processes spawned from a start-up process.


displays a quick list with the number of users and their names; other options are ignored.


displays all run-level change entries.


displays only the three fields user name, terminal, and time of entry.


displays the state of each terminal as a plus sign (+) if the terminal allows write access to other users, and a minus sign (-) if write access is denied. who displays a question mark (?) if the write access cannot be determined.


displays all time change entries using the date command (both old and new time).


displays only entries associated with logged-in users; each user's idle time is also displayed. Idle time is described under -i.


displays the terminal state; this indicates whether or not the terminal is writable.



current status file.


activity history file.


Possible exit status values are:


Successful completion.


Failure because of an invalid command line option, or because of too many command line arguments.


POSIX.2. x/OPEN Portability Guide 4.0. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.

Only who am i and who am I are useful under 8.1/2012R2/10/2016/2019/11/2022.

On 8.1/2012R2/10/2016/2019/11/2022, who am i and who am I do not work if a ROOTDIR/etc/utmp file exists. Using the date command to set the date writes to the ROOTDIR/etc/utmp file, creating it if necessary. Deleting this file on 8.1/2012R2/10/2016/2019/11/2022 does not affect the operation of PTC MKS Toolkit utilities.

The -A, -a, -b, -d, -H, -i, -l, -L, -p, -r, -s, -t, -w, and am i options are extensions to the POSIX standard.

The -A, -i, -L, and -w options are extensions to the x/OPEN standard.


PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition



File Formats:

PTC MKS Toolkit 10.4 Documentation Build 39.