Concept Flow - whoami and id commands
Start
Run 'whoami'
Display current username
Run 'id'
Display user and group info
End
The flow shows running 'whoami' to get the username, then 'id' to get detailed user and group info.
whoami id
| Step | Command | Action | Output |
|---|---|---|---|
| 1 | whoami | Get current username | alice |
| 2 | id | Get user and group IDs | uid=1001(alice) gid=1001(alice) groups=1001(alice),27(sudo) |
| Variable | Start | After whoami | After id | Final |
|---|---|---|---|---|
| username | undefined | alice | alice | alice |
| uid | undefined | undefined | 1001 | 1001 |
| gid | undefined | undefined | 1001 | 1001 |
| groups | undefined | undefined | 1001(alice),27(sudo) | 1001(alice),27(sudo) |
whoami: shows current username id: shows user ID, group ID, and groups Use whoami for simple username Use id for detailed user info Both help identify current user context