whoami is a one of the basic Unix commands with a single purpose: it confirms your effective user id. Put simply, it shows you your username.
There are no parameters to specify, so just type whoami and it will output a username (my username is greys):
[email protected]:~ $ whoami greys
Username vs Effective Username
You may hear about effective usernames. That's because in Unix and Linux it's possible to use commands like su command and sudo command to become a different user and to execute commands under another user's identity.
[email protected]:~ $ sudo -i [sudo] password for greys: [email protected]:~ # whoami root