Can 'whoami' show other user details?

QuestionsQuestions8 SkillsProYour First Linux LabSep, 23 2025
0101

No, the whoami command only displays the username of the currently logged-in user. It does not provide details about other users on the system.

If you want to see information about other users, you can use commands like id, getent passwd, or cat /etc/passwd, which can provide more details about user accounts on the system.

For example, to see your user ID and group ID, you can run:

id

If you have any further questions or need clarification, feel free to ask!

0 Comments

no data
Be the first to share your comment!