What is the whoami command in Linux?

The whoami command returns the username of the current user.

Syntax

whoami [OPTION]
OPTION Description
--version Displays the version information of the command
--help Displays the command description and options

Code

whoami
echo "-----"
whoami --version
echo "-----"
whoami --help

Free Resources