Whoami

Command on various operating systems


title: "Whoami" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["unix-user-management-and-support-related-utilities", "reactos-commands", "windows-administration"] description: "Command on various operating systems" topic_path: "technology/operating-systems" source: "https://en.wikipedia.org/wiki/Whoami" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Command on various operating systems ::

::data[format=table title="Infobox software"]

FieldValue
namewhoami
screenshotWhoami screenshot.png
captioncoreutils whoami command
developerBill Joy, Richard Mlynarik, Intel, Microsoft, ReactOS Contributors, Novell
operating systemUnix, Unix-like, iRMX 86, Windows, ReactOS, NetWare
platformCross-platform
genreCommand
licenseBSD: BSD License
coreutils: GPLv3
iRMX 86, Windows, NetWare: Proprietary commercial software

| ::

| name = whoami | logo = | screenshot = Whoami screenshot.png | screenshot size = | caption = coreutils whoami command | developer = Bill Joy, Richard Mlynarik, Intel, Microsoft, ReactOS Contributors, Novell | released = | latest release version = | latest release date = | operating system = Unix, Unix-like, iRMX 86, Windows, ReactOS, NetWare | platform = Cross-platform | genre = Command | license = BSD: BSD License coreutils: GPLv3 iRMX 86, Windows, NetWare: Proprietary commercial software

ReactOS: GPLv2 | website = In computing, is a command found on most Unix-like operating systems, Intel iRMX 86, every Microsoft Windows operating system since Windows Server 2003, and on ReactOS. It is a concatenation of the words "Who am I?" and prints the effective username of the current user when invoked.

Overview

::figure[src="https://upload.wikimedia.org/wikipedia/commons/6/63/ReactOS-0.4.13_whoami_command_667x434.png" caption="The [[ReactOS]] whoami command"] ::

The command has the same effect as the Unix command . On Unix-like operating systems, the output of the command is slightly different from $USER because 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 as John and into root, displays and displays . This is because the command does not invoke a login shell by default.

The earliest versions were created in 2.9 BSD as a convenience form for , the Berkeley Unix command's way of printing just the logged in user's identity. This version was developed by Bill Joy.

The GNU version was written by Richard Mlynarik and is part of the GNU Core Utilities (coreutils).

The command is available as a separate package for Microsoft Windows as part of the GnuWin32 project and the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities.

On Intel iRMX 86 this command lists the currents user's identification and access rights.

The command is also available as part of the Windows 2000 Resource Kit and Windows XP SP2 Support Tools.

The ReactOS version was developed by Ismael Ferreras Morezuelas and is licensed under the GPLv2.

This command was also available as a NetWare-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.

Example

Unix, Unix-like

::code[lang=console]

whoami

root ::

Intel iRMX 86

::code[lang=console] --WHOAMI USER ID: 5 ACCESS ID'S: 5, WORLD ::

Windows, ReactOS

::code[lang=doscon] C:\Users\admin>whoami workgroup\admin ::

References

References

  1. "Microsoft TechNet Whoami article".
  2. [https://www.freebsd.org/cgi/man.cgi?query=whoami&apropos=0&sektion=0&manpath=2.9.1+BSD&arch=default&format=html 2.9.1BSD Manual Page]
  3. [https://gnuwin32.sourceforge.net/packages/coreutils.htm CoreUtils for Windows]
  4. [https://unxutils.sourceforge.net/ Native Win32 ports of some GNU utilities]
  5. [https://archive.org/details/bitsavers_inteliRMX1_19819263 iRMX™86 INTRODUCTION AND OPERATOR'S REFERENCE MANUAL For Release 6]
  6. [http://www.microsoft.com/downloads/details.aspx?familyid=3E89879D-6C0B-4F92-96C4-1016C187D429&displaylang=en Windows 2000 Resource Kit Tool: Whoami.exe]
  7. [http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&displaylang=en Windows XP Service Pack 2 Support Tools]
  8. (3 January 2022). "Reactos/Reactos".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

unix-user-management-and-support-related-utilitiesreactos-commandswindows-administration