User Management

useradd

Create a new user account on the system.

Synopsis

syntax
useradd [OPTION]... LOGIN

Examples

Create user with home directory
sudo useradd -m alice
Create user with bash shell and extra groups
sudo useradd -m -s /bin/bash -G sudo,docker alice
Create service account without login shell
sudo useradd -m -d /opt/app -s /usr/sbin/nologin appuser

Common options

FlagDescription
-mCreate home directory
-sLogin shell
-gPrimary group
-GSupplementary groups
-dHome directory path
-eAccount expiration date

About useradd

The `useradd` command create a new user account on the system. User management commands handle creation, modification, and deletion of user accounts and groups.

Multi-user access control is a core feature of Linux. These commands are essential for system administrators managing servers, enforcing security policies, and provisioning access for teams.

The command accepts 6 commonly used flags shown above, though the full set of options is available in the man page (`man useradd`). The 3 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More User Management Commands

Other commands in the User Management category

Related tools