Bird
0
0

If the command whoami outputs 'alice', what will id -un output?

medium📝 Command Output Q5 of 15
Linux CLI - Users and Groups
If the command whoami outputs 'alice', what will id -un output?
Aalice
B1001
Cstaff
Droot
Step-by-Step Solution
Solution:
  1. Step 1: Understand id -un flags

    -u means user ID, -n means show name instead of number.
  2. Step 2: Compare with whoami output

    Both commands show the username. Since whoami outputs 'alice', id -un will also output 'alice'.
  3. Final Answer:

    alice -> Option A
  4. Quick Check:

    id -un = username [OK]
Quick Trick: Use id -un to get username like whoami [OK]
Common Mistakes:
  • Expecting user ID number instead of name
  • Confusing group name with username
  • Using wrong flags for username

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes