Understanding the difference between useradd and adduser on Linux
useradd is the low-level tool, adduser an interactive Perl wrapper specific to Debian: practical differences and which one to pick.
Also available in Français

When administering a Linux system, you often need to create new users. Two commands exist for this: useradd and adduser. At first glance they seem equivalent, but their origin and behavior differ noticeably.
1. useradd: the native command
useradd is one of the low-level user account management tools provided by the passwd package (often coming from the shadow-utils project in modern distributions).
- Role: create a user account by directly manipulating system files such as
/etc/passwd,/etc/shadow,/etc/groupand/etc/skel. - Behavior: by default,
useraddis quite strict and minimal. If no option is passed, the user can be created without a home directory and without a shell defined. - Syntax:
useradd -m -s /bin/bash newuserHere,-mforces the creation of the home directory and-ssets the default shell.
In short, useradd is a low-level tool, meant to be used in scripts or by experienced administrators who know exactly which parameters to provide.
2. adduser: the friendly wrapper
adduser is not a native command of the kernel or of the base utilities, but a Perl script (in Debian/Ubuntu and derivatives). Its goal is to make the experience simpler and more interactive.
- Role: provide a high-level interface to
useradd. - How it works: it acts as a wrapper: it calls
useradd(and sometimesusermod) in the background, but adds validation logic and interaction with the administrator. - Interaction: when you type
adduser newuser, the script asks you questions: password, full name, additional information… then automatically creates the home directory, copies the files from/etc/skel, sets permissions, etc.
Why Perl?
Historically, in Debian and its derivatives, adduser was written in Perl in order to quickly benefit from a powerful and portable scripting language to add this ergonomic layer on top of the existing system tools.
- It made conditional and interactive logic possible, which would be harder to maintain in pure shell.
- With Perl, string handling, interactive forms and configuration are simpler.
3. Practical differences between useradd and adduser
| Aspect | useradd | adduser |
|---|---|---|
| Origin | Low-level tool (shadow-utils) | Perl script (Debian/Ubuntu) |
| Home directory | Not created by default | Always created |
| Default shell | May be /bin/sh or undefined | Set automatically (often /bin/bash) |
| Interaction | None, requires all options | Asks questions (password, info) |
| Portability | Present on all distros | Specific to Debian-based distros (Ubuntu, Mint, etc.) |
| Target | Scripts and expert admins | Administrators looking for simplicity |
4. Conclusion: which one to use?
- On Debian/Ubuntu and derivative distributions,
adduseris recommended for most cases, as it is safer and prevents oversights (home directory, shell, etc.). - On other systems like Red Hat, CentOS, Fedora, only the
useraddcommand is available — which reflects its nature as a universal tool.
In practice, adduser is just a Perl wrapper around useradd, but it illustrates well the Debian philosophy: making administration more accessible while keeping the power of Unix tools in the background.
👉 When we automate account management in our client infrastructures, we favor useradd in scripts (predictable, universal), and adduser for daily manual administration (ergonomic, secure).