User Identity
Current Task
Display Your Username
Use the whoami command to show your current user identity
Use the whoami command to show your current user identity
In Linux, every process runs as a specific user. Knowing your identity helps you understand:
The simplest way to check your username. Returns just the username - nothing more.
Shows your User ID (UID), primary Group ID (GID), and all group memberships.
uid=1000(student) - Your User ID and username
gid=1000(student) - Your primary Group ID
groups=... - All groups you belong to
Lists all groups you're a member of in a simple format.
System administrators use these commands to verify user permissions before troubleshooting access issues. If a user can't access a file, checking id reveals if they're in the required group.
The sudo group grants administrative privileges. If you see it in your groups, you can run commands as root using sudo.