commands
whoami — effective user identity
GNU whoami prints the name associated with the effective user ID. It is not necessarily the original login user. The name root denotes the privileged user identity within the relevant environment; isolation boundaries may limit that privilege.
Formal Syntax & Structure
linux syntaxlinux
whoamiReturn Value
text and exit status
Effective username on stdout; zero on success, nonzero on failure.
Working Example
Example Snippetlinux
whoami