useradd

Create a new user account on the Linux system.

medium risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

useradd creates user accounts in /etc/passwd. -m creates a home directory, -s sets the login shell, -G adds to supplementary groups, -r creates a service account without login. On Debian/Ubuntu, `adduser` is the friendlier interactive wrapper.

Common flags
FlagMeaning
-m --create-homeCreate a home directory for the new user
-s --shellSet login shell (e.g. /bin/bash or /usr/sbin/nologin)
-G --groupsAdd to supplementary groups (comma-separated)
-u --uidSpecify a numeric user ID
-r --systemCreate a system account (no home, no interactive login)
Examples
useradd -m -s /bin/bash -G sudo,docker deployCreate deploy user with home, bash, and sudo+docker access · explain & risk-check →
useradd -r -s /usr/sbin/nologin prometheusCreate a service account with no login shell for Prometheus · explain & risk-check →
useradd -m -u 1500 -G developers aliceCreate alice with a specific UID and developers group · explain & risk-check →
Pro tip

For service accounts always use `-r -s /usr/sbin/nologin` — prevents interactive login while still allowing the service to run as that user.

Related
passwd usermod userdel groupadd id
Open the full explainer →More in Users, Permissions & Security

Reference text is hand-written and may be incomplete — check man useradd for your version. Test destructive commands on a non-production system first.