Whoami (command)

Whoami (command)

whoami is a command found on most Unix-like operating systems, Windows Vista and Windows Server 2008. It is a concatenation of the words "Who am I?" and prints the effective userid (username) of the current user when invoked.

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 login. 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 GNU version was written by Richard Mlynarik and is part of the GNU Core Utilities (coreutils).

The command is also available as part of the Windows 2000 Resource Kit [ [http://www.microsoft.com/downloads/details.aspx?familyid=3E89879D-6C0B-4F92-96C4-1016C187D429&displaylang=en Windows 2000 Resource Kit Tool: Whoami.exe] ] and Windows XP SP2 Support Tools [ [http://www.microsoft.com/downloads/details.aspx?FamilyId=49AE8576-9BB9-4126-9761-BA8011FABF38&displaylang=en Windows XP Service Pack 2 Support Tools] ] .

Example

# whoami root

ee also

*logname
*id
*who
*User identifier (Unix)
*List of Unix programs

References

External links

*man|1|whoami
* [http://technet2.microsoft.com/windowsserver/en/library/fc7edb8c-0e13-4d95-bb29-ad7464dac7071033.mspx?mfr=true Microsoft TechNet Whoami article]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Whoami (command) — whoami whoami (Who am I signifiant qui je suis ) est une commande UNIX permettant d afficher le nom de l usager associé à l identificateur effectif (user ID ou UID) courant de l usager. Commandes Unix Aide arch · apropos · cal ·… …   Wikipédia en Français

  • whoami — (Who am I signifiant qui suis je ) est une commande UNIX permettant d afficher le nom de l usager associé à l identificateur effectif (user ID ou UID) courant de l usager. C est également une commande DOS dans les versions récentes de Microsoft… …   Wikipédia en Français

  • whoami — whoami  команда Unix, выводящая имя пользователя, ассоциированное с текущим эффективным идентификатором пользователя. В некоторых дистрибутивах на нее имеется псевдоним who am i. Пример использования: [17:53] root@hemlock: # whoami root… …   Википедия

  • Command Prompt — For other uses, see Command prompt (disambiguation). CMD redirects here. For other uses, see CMD (disambiguation). Command Prompt A component of Microsoft Windows …   Wikipedia

  • COMMAND.COM — Le programme COMMAND.COM est l interpréteur de commandes du systèmes DOS. On ne le confondra pas avec cmd.exe, qui est l interpréteur de commande de Windows NT (Windows 2000, Windows XP...) et d OS/2. Leur successeur depuis 2006 est Windows… …   Wikipédia en Français

  • cd (command) — cd, sometimes also available as chdir (change directory), is a command line command to change the current working directory in operating systems such as Unix, DOS, OS/2, AmigaOS (where if a bare path is given, cd is implied), Windows, and Linux.… …   Wikipedia

  • more (command) — more Example output of the more command Developer(s) Daniel Halbert Operating system Cross platform …   Wikipedia

  • choice (command) — In computing, CHOICE is a DOS command that allows for batch files to prompt the user to select one item from a set of single character choices. It was introduced as an external command (with filenames CHOICE.COM or CHOICE.EXE) with MS DOS 6.0,[1] …   Wikipedia

  • Cls (command) — cls (for clear screen) is a command used by the command line interpreters COMMAND.COM and cmd.exe on DOS, OS/2 and Microsoft Windows operating systems to clear the screen or console window of commands and any output generated by them. It does not …   Wikipedia

  • dir (command) — In computing, dir (directory) is a command used for file and directory listing, specifically in the command line interface (CLI) of the RT 11, CP/M, VMS, DOS, OS/2, Singularity and Microsoft Windows operating systems. It is analogous to the Unix… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”