Linux whoami Command

Linux 命令大全Linux Command Encyclopedia

The Linux whoami command is used to display the current user name.

Displays the current user's name. This command is equivalent to executing the "id -un" command.

Syntax

whoami [--help][--version]

Parameter Description:

  • --help Online help.
  • --version Displays version information.

Examples

Display the user name

# whoami 
root

Linux 命令大全Linux Command Encyclopedia

Other Extensions