SYNOPSIS
who [
who
who
who
DESCRIPTION
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.
Options
-A -
displays all accounting entries.
-a -
displays all types of entries. This is equivalent to specifying
-AbdilprTtuw . -b -
displays all entries written at system boot time.
-d -
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.)
-H -
displays column headings above the output.
-i -
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.
-L -
displays terminals which are waiting for someone to log in and login daemons such as network connections.
-l -
displays terminals which are waiting for someone to log in.
-m -
displays information about current terminal only.
-p -
displays entries for processes spawned from a start-up process.
-q -
displays a quick list with the number of users and their names; other options are ignored.
-r -
displays all run-level change entries.
-s -
displays only the three fields user name, terminal, and time of entry.
-T -
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.
-t -
displays all time change entries using the date command (both old and new time).
-u -
displays only entries associated with logged-in users; each user's idle time is also displayed. Idle time is described under
-i . -w -
displays the terminal state; this indicates whether or not the terminal is writable.
FILES
DIAGNOSTICS
Possible exit status values are:
- 0
-
Successful completion.
- 2
-
Failure because of an invalid command line option, or because of too many command line arguments.
PORTABILITY
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
The
AVAILABILITY
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
SEE ALSO
- Commands:
- whoami
- File Formats:
- utmp
PTC MKS Toolkit 10.4 Documentation Build 39.