whoami Linux Commands
What is Linux whoami Command?
Explanation
whoami COMMAND:whoami command is used to print current user's login name along with effective userid.
SYNTAX :
whoami [options]
OPTIONS:
--help |
Display Help. |
--version |
Display program version info |
EXAMPLE:
Let us consider an example to print effective userid.
-
whoami
Output:
root
In the above example, the cmd prints the current user's userid as 'root'.