To use the whoami command in a Linux terminal, follow these steps:
-
Open the Terminal: You can access the terminal from your Linux GUI or use a command-line interface.
-
Type the Command: Enter the following command:
whoami -
Press Enter: After typing the command, press the Enter key.
-
View the Output: The terminal will display the username of the currently logged-in user.
For example, if your username is john, the output will be:
john
This command is straightforward and provides quick information about your current user identity.
