Create and configure Linux user accounts from the shell quickly and reliably with the useradd command. 24.05.2026 | reading time: 2 min Who creates users on a server and wants it done fast and repeatably? The `useradd` command is the low-level, scriptable way to add accounts from the shell and is essential for automation and recovery. Hands-on Example Create a regular user named alice, set a shell, create a home and verify the account with the following commands: ```sudo useradd -m -s /bin/bash alice``` then set his password with ```sudo passwd alice``` and verify with ```id alice``` which typically shows ```uid=1001(alice) gid=1001(alice) groups=1001(alice)```. Power Options Use `-m` to create a home, `-s` to set the login shell, `-c` to add a GECOS comment, `-u` to fix a UID, `-g` and `-G` to set primary and supplementary groups, `-e` to expire an account and `-r` to create a system account; remember that `useradd` does not set a password by itself and needs `passwd` or `chpasswd` after creation, so combine commands in scripts for a complete provisioning step. Related Files User creation touches `/etc/passwd` for the account record, `/etc/shadow` for password hashes, `/etc/group` for group membership and `/etc/skel` for default files copied into new home directories; check those files when troubleshooting or migrating users. Nearby Tools On Debian-family systems `adduser` wraps `useradd` with an interactive, friendlier flow; use `usermod` to change existing accounts and `userdel` to remove them; for scale prefer configuration management like Ansible to enforce account state across many hosts. Wrap-up Mastering `useradd` gives direct control over account creation and is a building block for automating Linux system administration, so practice with care and incorporate it into scripts and audits; learn more and consider exam preparation like CompTIA Linux+ or LPIC-1 with intensive courses at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. setup security scripting infrastructure