Linux for Developers Course
Linux for Developers
/
Beginner

useradd

Definition

A low-level command used to create a new user account on the Linux system.

Explain Like I'm New

Hiring a new employee and giving them a badge so they can log into the computer.

Real World Example

A new developer, Bob, joins the team. The admin types `sudo useradd -m bob`. This creates Bob's account and automatically generates his `/home/bob` personal folder.

Common Use Cases

  • •Onboarding new employees
  • •Creating service accounts for apps

Interview Questions

basic

  • Does the `useradd` command automatically prompt you to set a password for the new user?

intermediate

  • What is the difference between `useradd` and `adduser`?

Flash Cards

Question

Prompt for password?

Click to reveal answer
Answer

No. `useradd` just creates the account. It is locked until you explicitly run the `passwd` command to set a password.

Question

useradd vs adduser?

Click to reveal answer
Answer

`useradd` is the raw, low-level binary command standard across all Linux. `adduser` is a friendly, interactive script (common in Ubuntu) that walks you through prompts for the password, full name, and room number.