Bird
0
0

What will happen if you run this command?

medium📝 Command Output Q5 of 15
Linux CLI - Users and Groups
What will happen if you run this command?
userdel -r nonexistentuser
ACreates a new user named nonexistentuser
BDeletes the user and home directory
CShows error: user does not exist
DDeletes root user accidentally
Step-by-Step Solution
Solution:
  1. Step 1: Understand userdel behavior on non-existing user

    If the user does not exist, userdel will return an error message indicating the user is not found.
  2. Step 2: Analyze options

    It will not delete anything or create users. Deleting root is impossible without specifying root.
  3. Final Answer:

    Shows error: user does not exist -> Option C
  4. Quick Check:

    Deleting non-existing user = error message [OK]
Quick Trick: userdel errors if user missing [OK]
Common Mistakes:
MISTAKES
  • Assuming userdel creates users
  • Thinking it deletes root by mistake
  • Ignoring error messages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes