Bird
0
0

After running userdel -r alice, you notice her home directory still exists. What might be the reason?

medium📝 Debug Q7 of 15
Linux CLI - Users and Groups
After running userdel -r alice, you notice her home directory still exists. What might be the reason?
AThe home directory was on a separate mounted filesystem
BThe <code>-r</code> option was ignored due to permissions
CThe user was logged in during deletion
DThe command syntax was incorrect
Step-by-Step Solution
Solution:
  1. Step 1: Understand userdel -r behavior with mounted filesystems

    If the home directory is on a different mounted filesystem, userdel -r may not remove it automatically.
  2. Step 2: Analyze other reasons

    Permissions or syntax errors usually cause command failure. Logged-in user may prevent deletion but home directory removal is separate.
  3. Final Answer:

    The home directory was on a separate mounted filesystem -> Option A
  4. Quick Check:

    Separate mount can keep home directory after userdel -r [OK]
Quick Trick: Mounted home directories may not delete with userdel -r [OK]
Common Mistakes:
  • Assuming userdel always deletes home
  • Ignoring mounted filesystem effects
  • Confusing logged-in user effects

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes