You are here: >

Linux and Unix whoami command

whoami commandAbout whoami
whoami syntax
whoami examples
Related commands
Linux and Unix main page

About whoami

whoami prints the effective user ID.

This command prints the username associated with the current effective user ID.

Running whoami is the same as running the id command with the options -un.

whoami syntax

whoami [OPTION]

Options

--help Display a help message, and exit.
--version Display version information, and exit.

whoami examples

whoami

Displays the name of the user who runs the command.

w — Show who is logged on and what they are doing.
who — Report which users are logged in to the system.