Linux whoami

whoami is a very a simple Linux command and can be used to find out the name of user who is currently logged in the terminal
i.e. if you are logged in to the system with username ‘john123′
than the output of the whoami will just display back ‘john123′ on the screen. whoami is different from who as who displays all users who are logged in the system.

whoami command really comes in handy when you are working on a system which does not display the name of the current user in the shell prompt

Surprisingly, the who am i command does not carry any complex switches, the only two options available with it are

whoami --help
whoami --version

Leave a Reply