Enhancing Skills

whoami: Display the current user’s username

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.


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.