How to Create a New User on Linux from the Terminal

With adduser, giving them sudo permissions correctly, and removing them if needed.

Intermediate 1 min read Published on 2026 By Equipo SolucionaPC
sudo adduser username

Guides you step by step: password, full name, and other optional details (you can leave them blank by pressing Enter).

adduser (interactive, friendlier) is different from useradd (more basic, requires specifying everything manually with options). For normal use, adduser is simpler and less error-prone.

Giving them administrator permissions (sudo)

sudo usermod -aG sudo username

Warning: use -aG, not just -G — the difference matters. Without the -a ("append"), the command replaces ALL of the user's existing groups instead of adding a new one, which can unintentionally remove their access to other important groups.

Removing a user (if needed later)

sudo deluser username

Frequently asked questions

What's the difference between adduser and useradd?

adduser is interactive and friendlier for normal use. useradd is more basic and requires specifying everything manually with options — adduser is the recommended option for most cases.

Why is it important to use -aG instead of just -G?

Without the -a ('append'), the command replaces all of the user's existing groups with the new one, instead of adding it — which can accidentally remove access to other important groups.

Share: