← All commands
Topic hub PowerShell Equivalents
Windows Linux PowerShell Equivalents Users & Groups

Windows PowerShell New-LocalUser equivalent in Linux

Creates a new local Linux user and optionally a home directory and login shell.

Windows PowerShell New-LocalUser
Linux equivalents
Debian/Ubuntu same command
sudo useradd -m USER
Fedora same command
sudo useradd -m USER
Arch same command
sudo useradd -m USER

Overview

What this command does

Creates a new local Linux user and optionally a home directory and login shell.

Migration tip: adduser is an interactive helper on Debian-based systems. useradd is the lower-level command available broadly.

Practical tasks

Common use cases

Create a user account

Creates a new local Linux user and optionally a home directory and login shell.

sudo useradd -m -s /bin/bash alice

Create a user with home and Bash

sudo passwd alice

Set the password

sudo adduser alice

Use the interactive Debian helper

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

sudo useradd -m -s /bin/bash alice
sudo passwd alice
sudo adduser alice

Walkthrough

Examples with explanations

sudo useradd -m -s /bin/bash alice # create a user and home directory
sudo passwd alice # set the user password
sudo adduser alice # create a user interactively

Reference

Common options and variations

Command or optionUse
sudo useradd -m -s /bin/bash aliceCreate a user with home and Bash
sudo passwd aliceSet the password
sudo adduser aliceUse the interactive Debian helper

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 sudo useradd -m USER Same command on this distribution.
Fedora same command sudo useradd -m USER Same command on this distribution.
Arch same command sudo useradd -m USER Same command on this distribution.

Keep learning

Related PowerShell Equivalents commands