Back to the command reference

whoami

UsersBeginner In simulator In real Linux

Print the current user name

Name: whoami = who am I

You can practise it right away in the simulator, and use it in real Linux mode too.

Description

whoami prints the name of the current effective user; under sudo it says root because the effective user changed.

Syntax

whoami

Examples

  • $ whoami

    Print who you are, e.g. user

    Explain

Related