Bird
0
0

Which option with useradd ensures a home directory is created for the new user?

easy📝 Conceptual Q2 of 15
Linux CLI - Users and Groups
Which option with useradd ensures a home directory is created for the new user?
A-d
B-m
C-r
D-s
Step-by-Step Solution
Solution:
  1. Step 1: Identify the option for home directory creation

    The -m option tells useradd to create the user's home directory if it does not exist.
  2. Step 2: Understand other options

    -d specifies a custom home directory path, -r creates a system account, and -s sets the login shell.
  3. Final Answer:

    -m -> Option B
  4. Quick Check:

    -m creates home directory [OK]
Quick Trick: Use -m with useradd to create home directory [OK]
Common Mistakes:
  • Using -d alone without -m does not create directory
  • Confusing -r with home directory creation
  • Assuming -s creates home directory

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes