Forever & AlwaysLINUX COMMAND ATLAS

LINUX COMMAND ATLAS · COMMAND GUIDE

Linux whoami command

Print the username associated with the current effective user ID.

GNU Coreutils

Syntax

Command form
whoami [OPTION]...

Common options

2 options
OptionWhat it does
--helpDisplay help and exit.
--versionDisplay version information and exit.

Usage examples

2 examples

Print the username associated with the current effective user ID.

whoami

Show which user an elevated command would run as.

sudo whoami

Notes

whoami prints the effective user name; it does not necessarily identify the person at the keyboard.