Bird
0
0

What will be the output of id -gn if the current user belongs to the group named 'staff'?

medium📝 Command Output Q4 of 15
Linux CLI - Users and Groups
What will be the output of id -gn if the current user belongs to the group named 'staff'?
Aroot
B1000
Cstaff
Dstaff root
Step-by-Step Solution
Solution:
  1. Step 1: Understand id -gn flags

    -g means primary group ID, -n means show name instead of number.
  2. Step 2: Interpret output for group name

    The command outputs the primary group name of the user, which is 'staff' here.
  3. Final Answer:

    staff -> Option C
  4. Quick Check:

    id -gn = primary group name [OK]
Quick Trick: Use id -gn to get primary group name [OK]
Common Mistakes:
  • Expecting group ID number instead of name
  • Listing multiple groups incorrectly
  • Confusing user groups with usernames

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes