Recall & Review
beginner
What does the
whoami command do in Linux?The
whoami command shows the username of the current user who is logged in and running the shell.Click to reveal answer
beginner
What information does the
id command provide?The
id command shows the user ID (UID), group ID (GID), and the groups the current user belongs to.Click to reveal answer
intermediate
How can
id help in understanding user permissions?By showing the UID, GID, and groups,
id helps you know what permissions the user has based on group memberships.Click to reveal answer
intermediate
What is the difference between
whoami and id -un?whoami and id -un both show the current username, but id -un is part of the id command options.Click to reveal answer
intermediate
Can
id show information about other users?Yes, by adding a username after
id, like id username, it shows that user's UID, GID, and groups.Click to reveal answer
What does the
whoami command display?✗ Incorrect
whoami simply prints the username of the user running the command.Which command shows the user ID (UID) and group ID (GID)?
✗ Incorrect
id shows UID, GID, and groups of the user.How do you use
id to see information about another user named 'alice'?✗ Incorrect
Typing
id alice shows UID, GID, and groups for user 'alice'.Which command would you use to find your current username quickly?
✗ Incorrect
Both
whoami and id -un show the current username.What does the
id command NOT show by default?✗ Incorrect
id does not show the user's home directory; it shows UID, GID, and groups.Explain what the
whoami and id commands do and when you might use each.Think about checking who you are vs. what groups you belong to.
You got /4 concepts.
Describe how you would find out the groups a user belongs to using Linux commands.
Focus on commands that reveal group info.
You got /4 concepts.