whoami: Display the current user’s username
August 9th, 2024 1:18 PM Mr. Q Categories: Command
Command: whoami
The whoami
command shows the username of the currently logged-in user. It is a simple and quick way to verify which user account is active.
Sample Commands and Outputs:
whoami
: Displays the username of the currently logged-in user. Sample Command and Output:
$ whoami
user1
Description:
user1
: The username of the current user.
Note: The whoami
command is particularly useful for scripts and troubleshooting to confirm the identity of the active user.