Bird
0
0

You run userdel -r bob but get an error saying user bob does not exist. What is the likely cause?

medium📝 Debug Q14 of 15
Linux CLI - Users and Groups
You run userdel -r bob but get an error saying user bob does not exist. What is the likely cause?
AThe home directory is missing
BUser bob was never created
CYou need to use useradd to delete users
DThe -r option is invalid with userdel
Step-by-Step Solution
Solution:
  1. Step 1: Understand the error message

    The error says user bob does not exist, so the system cannot delete a non-existent user.
  2. Step 2: Check command validity

    userdel -r bob is valid syntax to delete user and home directory, so the error is not due to syntax.
  3. Final Answer:

    User bob was never created -> Option B
  4. Quick Check:

    User must exist before deletion [OK]
Quick Trick: Check if user exists before deleting [OK]
Common Mistakes:
  • Thinking -r is invalid option
  • Trying to delete users with useradd
  • Assuming home directory missing causes error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes