Whoami (Unix)
From DssWiki
{{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
|{{{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}}}}}}
{{#if: |
Unix command line programs and builtins (more) | |||
| File and file system management: | cat | chattr | cd | chmod | chown | chgrp | cksum | cmp | cp | du | df | file | fsck | fuser | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch | ||
| Process management: | at | chroot | crontab | exit | kill | killall | nice | pgrep | pidof | pkill | ps | sleep | time | top | wait | watch | ||
| User Management/Environment: | env | finger | id | mesg | passwd | su | sudo | uname | uptime | w | wall | who | whoami | write | ||
| Text processing: | awk | comm | cut | ed | ex | fmt | head | iconv | join | less | more | paste | pg | sed | sort | tac | tail | tr | uniq | wc | xargs | ||
| Shell programming: | basename | echo | expr | false | printf | test | true | unset | Printing: | lp |
| Communications: inetd | netstat | ping | rlogin | traceroute | Searching: find | grep | strings | Miscellaneous: banner | bc | cal | dd | man | size | yes | |
