adduser Command Generator
Generate adduser commands to create a new user account
Getting Started with adduser
## What is adduser?
The `adduser` command creates a new user account on Debian/Ubuntu systems. It is an interactive, friendlier wrapper around `useradd` that prompts for a password and full name by default, sets up a home directory, and copies skeleton files into it.
## How to Use
1. **Enter Username**: Provide the login name of the new user (required). 2. **Set Account Options**: Optionally specify primary group, supplementary groups, home directory, shell, or a GECOS comment. 3. **Choose Flags**: Tick `-m` to create the home directory, or `--system` for a system account. 4. **Copy & Run**: Copy the generated command into your terminal. Run as root or with `sudo`.
Common Options
### `-g` Primary group Set the user's primary login group by name or GID. Overrides the default of creating a group named after the user.
### `-G` Supplementary groups Add the user to additional groups (comma-separated, no spaces). Example: `-G sudo,docker`.
### `-d` Home directory Specify a non-default home directory path, e.g. `-d /var/lib/jenkins`.
### `-s` Login shell Set the login shell path. Common values: `/bin/bash`, `/bin/zsh`, `/usr/sbin/nologin` (for service accounts).
### `-m` Create home Create the home directory and populate it from `/etc/skel`. Without `-m` on a system that does not create it by default, no home directory is built.
### `-c` Comment (GECOS) Set the comment field (full name, room number, phone) shown by tools like `finger` and in emails.
### `--system` System user Create a system user (lower UID range, no expiry by default) for service accounts such as databases or daemons.
▶How do I create a user with sudo and docker access?
▶How do I create a service account that cannot log in?
▶adduser vs useradd — what's the difference?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee