Linux whoami Command with Example

In this article, we are going to learn Linux whoami Command with Example. In computing, whoami is a command found on most Unix-like operating systems, Intel iRMX 86, every Microsoft Windows operating system since Windows Server 2003, and on ReactOS. It is a concatenation of the words “Who am I?” and prints the effective username of the current user when invoked.

Linux whoami Command with Example

Linux whoami Command with Example

Linux whoami Command:

whoami the command is utilized both in Unix Operating System and just as in Windows Operating System.

It is essentially the link of the strings “who“, “am“, “i” as whoami.

It shows the username of the current user when this command is conjured.

It is comparable to running the id command with the choices -un.

The most punctual adaptations were made in 2.9 BSD as an accommodation structure for who am I,
the Berkeley Unix who commands method of the printing simply the signed-in user’s identity.
The GNU version was composed by Richard Mlynarik and is important for the GNU Core Utilities (Coreutils).

Syntax:

itsmarttricks@msdhulap~: whoami

Output :

itsmarttricks

Syntax:

itsmarttricks@msdhulap~: whoami [OPTION]

Options of Whoami

Syntax:

itsmarttricks@msdhulap~: whoami [OPTION]

1. –help Option :

It gives the help message and exit.

Syntax :

itsmarttricks@msdhulap~: whoami --help

2. –version Option :

It gives the version information and exit.

Syntax:

itsmarttricks@msdhulap~: whoami --version

Also Read – Learn Basic Linux System Commands For Linux Foundation Certified IT Associate (LFCA) Certification

That’s all, In this article, we have explained Linux whoami Command with Example. I hope you enjoy this article. If you like this article, then just share it and then do subscribe to email alerts for Linux, Windows, macOS, Android, Internet, Firewall and Security, CCTV tutorials. If you have any questions or doubts about this article, please comment.

Share this:

Mangesh Dhulap

This is Mangesh Dhulap the Founder and Editor of IT SMART TRICKS have 6+ years of Industrial Experience. We expect from our visitors to like, share, and comment on our posts.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.