Full journal
· 3 min read

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/group and /etc/skel.
  • Behavior: by default, useradd is 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 newuser Here, -m forces the creation of the home directory and -s sets 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 sometimes usermod) 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

Aspectuseraddadduser
OriginLow-level tool (shadow-utils)Perl script (Debian/Ubuntu)
Home directoryNot created by defaultAlways created
Default shellMay be /bin/sh or undefinedSet automatically (often /bin/bash)
InteractionNone, requires all optionsAsks questions (password, info)
PortabilityPresent on all distrosSpecific to Debian-based distros (Ubuntu, Mint, etc.)
TargetScripts and expert adminsAdministrators looking for simplicity

4. Conclusion: which one to use?

  • On Debian/Ubuntu and derivative distributions, adduser is 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 useradd command 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).

Subscribe via RSS

DRAWN BY A. PERROTRSS · © 2026 — RÉV. 11/2026