Linux whoami Command
Posted on November 3, 2020 (Last modified on June 20, 2022) • 1 min read • 198 wordsIn this tutorial we will learn how to use whoami command in Linux. whoami is a command which the user name associated with the current effective user ID. This command similar to running id command with -un option.
In this tutorial we will learn how to use whoami
command in Linux.
whoami
is a command which the user name associated with the current effective user ID. This command similar to running id
command with -un
option.
whoami [OPTION]...
To get help for whoami command we can run the command below.
whoami --help
We can also read man page and infopage for whoami by running the command below.
man whoami
info whoami
to run whoami, we can just run whoami
with no option, it will print our username. For example:
$ whoami
howtodojo
You can find whoami command source code from the following repositories:
{{ youtube 1jUUJbzxxEI }}
In this tutorial we learn how to use whoami
command in Linux with practical examples. Visit our
Linux Commands guide to learn more about using command line interface in Linux.