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
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
displays the terminal state; this indicates whether or not the terminal is writable.
Possible exit status values are:
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 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.
Only who am i and who am I are useful under 7/2008R2/8/2012/10/2016.
On 7/2008R2/8/2012/10/2016, 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 7/2008R2/8/2012/10/2016 does not affect the operation of PTC MKS Toolkit utilities.
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.1 Documentation Build 15.