GO KALI FREE
User Management

whoami Linux Command

Displays the username of the currently logged-in user.

What does whoami do?

Displays the username of the currently logged-in user.

Syntax

whoami

Practical example

whoami

Related User Management

last

Shows the last logged-in users from the system log file.

who

Shows all users currently logged into the system with login details.

groups

Displays all groups the current user is a member of.

w

Displays who is logged in and what they are currently doing.

groupdel

Deletes an existing group from the system.

id

Prints user and group IDs (UID, GID) for the specified or current user.