What is the whoami command?
The whoami command displays the user name that corresponds to the user ID. In other words, it shows the current or logged-in user’s username.
Any user can use the command in most UNIX-like operating systems. It is also available on Microsoft Windows since Windows Server 2003.
When invoked, it is a concatenation of the words “Who am I?” and outputs the effective username of the current user.
whoami is a cross-platform used in every type of operating system.
This command was developed by Bill Joy, Richard Mlynarik, Intel, Microsoft, ReactOS Contributors, Novell.
How to use the whoami command Linux?
Syntax: whoami [options]
–help: It gives the help message.
–version: It gives the version information.
- To see the name of the currently logged-in user, use the following command without any options.
- If you don’t know about options, use the following command.
- To see the version of the command, use the following command.
This command is a compound of “Who am I?” and prints the user’s name associated with the current effective user ID.
More about Linux fundamentals is coming in further articles.
Would you please leave a comment if you have any queries or feedback?