Users
The adduser command
Creates a new user account. With -m it builds the home folder and copies the base files; it prompts for the rest interactively.
Most useful options
-mCreates the user's home folder-sSets the login shell-GAdds the user to extra groups-dUses a different home folder-cComment or full name (GECOS)Copy-ready examples
$ sudo adduser anaCreates the ana account with its home$ sudo adduser -m -s /bin/bash luisAccount with home folder and bashYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- It needs administrator rights: run it with sudo.
- Valid names start with a letter or underscore; avoid uppercase and spaces.
FAQ
How does adduser differ from useradd?
adduser is a friendly wrapper that prompts and creates the home; useradd is the low-level command.
Is creating the user enough?
No: set a password with sudo passwd user so it can log in.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course