Bird
0
0

What will be the output of the command id -u if the current user has user ID 1001?

medium📝 Command Output Q13 of 15
Linux CLI - Users and Groups
What will be the output of the command id -u if the current user has user ID 1001?
A1001
Buid=1001(user)
Cuser=1001
Did: invalid option
Step-by-Step Solution
Solution:
  1. Step 1: Understand the -u option of id

    The -u option prints only the numeric user ID (UID) of the current user.
  2. Step 2: Match output format

    The output will be just the number 1001, not a string with 'uid=' or other text.
  3. Final Answer:

    1001 -> Option A
  4. Quick Check:

    id -u = UID number only [OK]
Quick Trick: id -u prints only your numeric user ID [OK]
Common Mistakes:
  • Expecting full id output with -u
  • Confusing uid= prefix with plain number
  • Thinking -u is invalid option

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes