Bird
0
0

What will be the output of sudo id -u when run by a user with sudo rights?

medium📝 Command Output Q4 of 15
Linux CLI - Users and Groups
What will be the output of sudo id -u when run by a user with sudo rights?
A0
B1000
C1
DPermission denied
Step-by-Step Solution
Solution:
  1. Step 1: Understand id -u command

    id -u shows the user ID number.

  2. Step 2: Effect of sudo on user ID

    Running with sudo runs the command as root, whose user ID is 0.

  3. Final Answer:

    0 -> Option A
  4. Quick Check:

    sudo id -u = 0 (root user) [OK]
Quick Trick: sudo runs commands as root user ID 0 [OK]
Common Mistakes:
  • Expecting normal user ID
  • Thinking sudo denies permission
  • Confusing user IDs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes