WebMasterCampus
WEB DEVELOPER Resources

Linux whoami Command

Learn Linux whoami Command with example


Linux whoami Command

In Linux we can use “whoami” command to display or identify the user name currently logged in. In other words, type whoami to print the user name currently logged in to the terminal session.

whoami prints the user name associated with the current effective user ID.

The only options are --help and --version.

whoami command Syntax

>> whoami

output:webmastercampus

whoami equivalent command is ‘id -un’

>> id -un

output: webmastercampus

whoami --version command

>> whoami --version

whoami --help command

>> whoami --help

whoami Command in Linux (Documentation)

NAME
       whoami - print effective userid

SYNOPSIS
       whoami [OPTION]...

DESCRIPTION
       Print the user name associated with the current effective user ID.  Same as id -un.

        --help 
            display this help and exit

        --version
                output version information and exit
Created with love and passion.