Bird
0
0

Which of the following is the correct syntax to create a user with a home directory?

easy📝 Syntax Q12 of 15
Linux CLI - Users and Groups
Which of the following is the correct syntax to create a user with a home directory?
Auseradd -r username
Buseradd username
Cuseradd -m username
Duserdel -m username
Step-by-Step Solution
Solution:
  1. Step 1: Identify the option for creating home directory

    The -m option with useradd creates the user's home directory.
  2. Step 2: Check other options

    -r is for system users or removing files with userdel, so it is incorrect here.
  3. Final Answer:

    useradd -m username -> Option C
  4. Quick Check:

    -m means make home directory [OK]
Quick Trick: Use -m with useradd to create home folder [OK]
Common Mistakes:
  • Using userdel instead of useradd
  • Forgetting the -m option for home directory
  • Using -r option with useradd

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes