Windows net user equivalent in Linux
Adds new users, changes user properties, and manages user accounts on the system.
net user
useradd / usermod
useradd / usermod
useradd / usermod
Overview
What this command does
On Windows, "net user" is used to create and manage user accounts. On Linux, the closest practical mapping shown here is "useradd / usermod". Adds new users, changes user properties, and manages user accounts on the system. This reference is grouped under Security & Permissions → Users & Groups.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows net user maps to useradd / usermod for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
For the broader concept behind this mapping, read Linux permissions for Windows users.
Practical tasks
Common use cases
Create and manage user accounts
Adds new users, changes user properties, and manages user accounts on the system.
adduser username
Create user interactively (recommended)
useradd -m username
Create user with home directory
usermod -aG group user
Add user to a group
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
sudo adduser john
sudo passwd john
sudo usermod -aG sudo john
sudo usermod -aG wheel john
sudo userdel -r john
Walkthrough
Examples with explanations
# Windows: net user john Password1 /add
sudo adduser john # create user (interactive)
sudo passwd john # set/change password
# Add to sudo group (give admin rights):
sudo usermod -aG sudo john # Ubuntu/Debian
sudo usermod -aG wheel john # Fedora/RHEL
# Delete user:
sudo userdel -r john # remove user + home dir
Reference
Common options and variations
| Command or option | Use |
|---|---|
adduser username | Create user interactively (recommended) |
useradd -m username | Create user with home directory |
usermod -aG group user | Add user to a group |
passwd username | Set or change user password |
userdel -r username | Delete user and their home directory |
cat /etc/passwd | List all user accounts |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
Debian/Ubuntu, Fedora and Arch all use "useradd / usermod" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | useradd / usermod |
Same command on this distribution. |
| Fedora | same command | useradd / usermod |
Same command on this distribution. |
| Arch | same command | useradd / usermod |
Same command on this distribution. |
Keep learning