Bird
0
0

You tried to add a user with useradd bob but got an error 'useradd: command not found'. What is the likely cause?

medium📝 Debug Q14 of 15
Linux CLI - Users and Groups
You tried to add a user with useradd bob but got an error 'useradd: command not found'. What is the likely cause?
AThe username 'bob' is already taken
BYou typed the command incorrectly; it should be 'adduser bob'
CThe system does not support user accounts
DYou need to run the command as root or with sudo
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the error message

    'command not found' means the shell cannot find the useradd command in your path or permission is denied.
  2. Step 2: Check permissions and command availability

    Adding users requires root privileges; running without sudo or root causes this error.
  3. Final Answer:

    You need to run the command as root or with sudo -> Option D
  4. Quick Check:

    Permission needed for useradd = You need to run the command as root or with sudo [OK]
Quick Trick: Use sudo before useradd to avoid permission errors [OK]
Common Mistakes:
  • Assuming username conflict causes 'command not found'
  • Thinking system lacks user accounts
  • Confusing 'useradd' with 'adduser' command

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes