Bird
0
0

You want to add user bob to the existing group admins without changing his primary group. Which command should you use?

hard📝 Application Q15 of 15
Linux CLI - Users and Groups
You want to add user bob to the existing group admins without changing his primary group. Which command should you use?
Ausermod -G admins bob
Busermod -aG admins bob
Cgroupadd -a bob admins
Dgroupmod -a bob admins
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct command to add a user to a supplementary group

    The usermod -aG group user command appends the user to the group without removing existing groups.
  2. Step 2: Check other options for correctness

    groupadd creates groups, not add users; usermod -G replaces groups instead of appending; groupmod modifies groups, not user membership.
  3. Final Answer:

    usermod -aG admins bob -> Option B
  4. Quick Check:

    Append user to group with usermod -aG [OK]
Quick Trick: Use usermod -aG to add user to groups safely [OK]
Common Mistakes:
MISTAKES
  • Using -G without -a which removes other groups
  • Trying to add users with groupadd or groupmod
  • Confusing primary and supplementary groups

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes