Bird
0
0

You want to create a new group design with GID 1050 and add user jane as its only member. Which sequence of commands is correct?

hard📝 Application Q9 of 15
Linux CLI - Users and Groups
You want to create a new group design with GID 1050 and add user jane as its only member. Which sequence of commands is correct?
Agroupadd design && usermod -g 1050 jane
Bgroupadd -g 1050 design && usermod -aG design jane
Cgroupadd -g 1050 design && gpasswd -d jane design
Dgroupadd design && gpasswd -d jane design
Step-by-Step Solution
Solution:
  1. Step 1: Create group with specific GID

    Use groupadd -g 1050 design to create the group with GID 1050.
  2. Step 2: Add user jane to design group

    Use usermod -aG design jane to add jane to the group without removing other groups.
  3. Final Answer:

    groupadd -g 1050 design && usermod -aG design jane -> Option B
  4. Quick Check:

    Create group with GID + add user with usermod -aG [OK]
Quick Trick: Use usermod -aG to add user to group without removing others [OK]
Common Mistakes:
MISTAKES
  • Using usermod -g which replaces primary group
  • Using gpasswd -d which removes user instead of adding
  • Not specifying GID during group creation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes