| whoami | |
|---|---|
coreutils whoami command | |
| Developers | Bill Joy, Richard Mlynarik,Intel,Microsoft, ReactOS Contributors,Novell |
| Operating system | Unix,Unix-like,iRMX 86,Windows,ReactOS,NetWare |
| Platform | Cross-platform |
| Type | Command |
| License | BSD:BSD License coreutils:GPLv3 iRMX 86, Windows, NetWare:Proprietarycommercial software ReactOS:GPLv2 |
Incomputing,whoami is acommand found on mostUnix-like operating systems,InteliRMX 86, everyMicrosoftWindows[1] operating system sinceWindows Server 2003, and onReactOS. It is aconcatenation of the words "Who am I?" and prints the effectiveusername of the current user when invoked.

whoami commandThe command has the same effect as the Unix commandid -un. On Unix-like operating systems, the output of the command is slightly different from$USER becausewhoami outputs the username that the user is working under, whereas$USER outputs the username that was used to log in. For example, if the user logged in asJohn andsu intoroot,whoami displaysroot andecho $USER displaysJohn. This is because thesu command does not invoke a login shell by default.
The earliest versions were created in 2.9 BSD as a convenience form forwho am i, the Berkeley Unixwho command's way of printing just the logged in user's identity. This version was developed byBill Joy.[2]
The GNU version was written by Richard Mlynarik and is part of theGNU Core Utilities (coreutils).
The command is available as a separate package forMicrosoft Windows as part of theGnuWin32 project[3] and theUnxUtils collection ofnativeWin32ports of commonGNU Unix-like utilities.[4]
On Intel iRMX 86 this command lists the currents user's identification and access rights.[5]
The command is also available as part of theWindows 2000Resource Kit[6] andWindows XP SP2Support Tools.[7]
The ReactOS version was developed by Ismael Ferreras Morezuelas and is licensed under theGPLv2.[8]
This command was also available as aNetWare-Command residing in the public-directory of the fileserver. It also outputs the current connections to which server the workstation is attached with which username.
#whoamiroot
--WHOAMIUSER ID: 5ACCESS ID'S: 5, WORLD
C:\Users\admin>whoamiworkgroup\admin