Whoami (Unix)

From DssWiki

Jump to: navigation, search

{{DISPLAYTITLE:{{#if:|:|}}whoami (Unix)}}

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
root

[edit] See also

[edit] External links

  • [{{Man/{{#if:

|{{{3}}}|default}}|1|whoami|url}} whoami{{#if:{{Man/{{#if: |{{{3}}}|default}}|1|whoami|display_section}}|({{Man/{{#if: |{{{3}}}|default}}|1|whoami|display_section}})}}]{{#if:|: }}{{#if:{{#ifeq: |inline||{{Man/{{#if: |{{{3}}}|default}}|1|whoami|attrib}}}}| – {{#ifeq: |inline||{{Man/{{#if: |{{{3}}}|default}}|1|whoami|attrib}}}}}}


<noinclude>Template:Unix-stub
Personal tools
efta 468 03-27-08 JOIN OUR TEAM!!