Cart 0
No products in the cart.

How to use whoami command in Linux ?

This tutorial provided an overview of the “whoami” command and 6 practical examples of its usage. The command is a useful utility for administrators who need to quickly determine which user is currently logged in to a particular machine. With the examples provided, you should now have a better understanding of how to use the "whoami" command in Linux.


How to fix whoami command not found in Linux ?

Whoami is a command used to display the currently logged in user in Linux terminal. If you receive the message "whoami: command not found" when trying to run the command, it means that the command is not installed on your system. You can fix this issue in a few simple steps.


1. Check for whoami on your system

The first step is to check if the whoami command is installed on your system. To do this, open the terminal and type "which whoami". If the command is installed, you will see the path to the executable file, otherwise you will see "no whoami in".


2. Install whoami

If the command is not installed, you can install it with the following command:

$ sudo apt-get install whoami

This command will install the whoami package on your system.


3. Verify the installation

Once the installation is complete, you can verify that the command is working by typing "whoami" in the terminal. If the command is working, you will see the currently logged in user.


That's it. You have successfully fixed the "whoami: command not found" issue in Linux.



Sign up to Newsletter

...and receive a free support ticket.