In computing, whoami is a command found on most Unix-like operating systems, InteliRMX 86, every MicrosoftWindows[1] 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

whoami commandThe command has the same effect as the Unix command id -un. On Unix-like operating systems, the output of the command is slightly different from $USER because whoami 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 su into root, whoami displays root and echo $USER displays John. This is because the su command does not invoke a login shell by default.
The earliest versions were created in 2.9 BSD as a convenience form for who am i, the Berkeley Unix who command's way of printing just the logged in user's identity. This version was developed by Bill Joy.[2]
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[3] and the UnxUtils collection of nativeWin32ports of common GNU 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 the Windows 2000Resource Kit[6] and Windows XP SP2 Support Tools.[7]
The ReactOS version was developed by Ismael Ferreras Morezuelas and is licensed under the GPLv2.[8]
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
# whoami raízIntel iRMX 86
--ID DE USUARIO DE WHOAMI : 5 ID DE ACCESO: 5, MUNDIALWindows, ReactOS
C:\Usuarios\admin> whoami workgroup\adminVéase también
Referencias
- ↑ "Artículo de Microsoft TechNet Whoami" . Archivado del original el 4 de mayo de 2008. Consultado el 22 de abril de 2008 .
- ↑ Página del manual de BSD 2.9.1
- ↑ CoreUtils para Windows
- ↑ Versiones nativas para Win32 de algunas utilidades de GNU
- ↑ iRMX™86 INTRODUCCIÓN Y MANUAL DE REFERENCIA DEL OPERADOR Para la versión 6
- ↑ Herramienta del kit de recursos de Windows 2000: Whoami.exe
- ↑ Herramientas de soporte para Windows XP Service Pack 2
- ↑ "Reactos/Reactos" . GitHub . 3 de enero de 2022.
Lecturas adicionales
- Barrett, Daniel J. (2012). Guía de bolsillo de la terminal de Macintosh: Toma el control de tu Mac . O'Reilly . ISBN 978-1449328986.
- Stanek, William R. (2008). Windows Command-Line Administrator's Pocket Consultant, 2.ª edición . Microsoft Press . ISBN 978-0735622623.
Enlaces externos
- – Manual de comandos generales de 4.2BSD
- – Manual de comandos generales de FreeBSD
- whoami | Microsoft Docs
- Comandos de Windows
- Utilidades relacionadas con la gestión y el soporte de usuarios de Unix
- Comandos de ReactOS
- Administración de Windows