Whoami

From Wikipedia, the free encyclopedia

The correct title of this article is whoami. The initial letter is shown capitalized due to technical restrictions.

whoami is a Unix-command found on most versions of Unix-based operating systems. It is a concatenation of the words "Who am I?" and prints the effective userid (username) of the current user when invoked. This is slightly different from $USER because whoami outputs the username that you are working under, whereas $USER outputs the username that you used to login. For example, if you login as John and su into root, whoami displays root and echo $USER displays John.

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

[edit] Example

$ whoami
Alice

[edit] See also

[edit] External links



In other languages