← All commands
Topic hub Security & Permissions
Windows Linux Security & Permissions Users & Groups

Windows net user equivalent in Linux

Adds new users, changes user properties, and manages user accounts on the system.

Windows net user
Linux equivalents
Debian/Ubuntu same command
useradd / usermod
Fedora same command
useradd / usermod
Arch same command
useradd / usermod

Overview

What this command does

Adds new users, changes user properties, and manages user accounts on the system.

Migration tip: Use adduser (note: no dash) instead of useradd on Debian/Ubuntu — it's friendlier and sets up the home directory interactively.

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 optionUse
adduser usernameCreate user interactively (recommended)
useradd -m usernameCreate user with home directory
usermod -aG group userAdd user to a group
passwd usernameSet or change user password
userdel -r usernameDelete user and their home directory
cat /etc/passwdList all user accounts

Distro differences

Debian/Ubuntu vs Fedora vs Arch

This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.

DistributionPackage manager / baseEquivalent commandDifference 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

Related Security & Permissions commands