Howtodojo logo
  • Home 
  • About 
  • Certifications 
  • Sample Database 
  • Cheatsheet 
  • Glossary 
  • Blog 
  • Tags 
  1.   Linux Commands
  1. Home
  2. Guides
  3. Linux Commands
  4. Linux whoami Command

Linux whoami Command

Share via
Howtodojo
Link copied to clipboard

In this tutorial we will learn how to use whoami command in Linux. whoami is a command which the user name associated with the current effective user ID. This command similar to running id command with -un option.

On this page
Introduction   whoami Syntax   Getting help for whoami   Invoking whoami   Linux whoami Command Source Code   Related Commands   Video Tutorial {#h-video-tutorial}   Summary  

Introduction  

In this tutorial we will learn how to use whoami command in Linux.

whoami is a command which the user name associated with the current effective user ID. This command similar to running id command with -un option.

whoami Syntax  

whoami [OPTION]...

Getting help for whoami  

To get help for whoami command we can run the command below.

whoami --help

We can also read man page and infopage for whoami by running the command below.

man whoami

info whoami

Invoking whoami  

to run whoami, we can just run whoami with no option, it will print our username. For example:

$ whoami
howtodojo

Linux whoami Command Source Code  

You can find whoami command source code from the following repositories:

  • whoami source code on GitHub
  • whoami source code on GNU Savannah cgit
  • whoami source code on GNU Savannah gitweb

Related Commands  

  • w command in Linux
  • id command in Linux
  • who command in Linux

Video Tutorial {#h-video-tutorial}  

{{ youtube 1jUUJbzxxEI }}

Summary  

In this tutorial we learn how to use whoami command in Linux with practical examples. Visit our Linux Commands guide to learn more about using command line interface in Linux.

 Linux factor Command
On this page:
Introduction   whoami Syntax   Getting help for whoami   Invoking whoami   Linux whoami Command Source Code   Related Commands   Video Tutorial {#h-video-tutorial}   Summary  
Follow me

We publish tutorials, tips and tricks about Linux, open source, cloud computing, and infrastructure

     
Copyright © 2012 - 2025 howtodojo.com. |
Howtodojo
Code copied to clipboard