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

Windows net user username /passwordreq equivalent in Linux

Sets or changes a user account password.

Windows net user username /passwordreq
→
Linux equivalents
Debian/Ubuntu same command
passwd
Fedora same command
passwd
Arch same command
passwd

Overview

What this command does

On Windows, "net user username /passwordreq" is used to change user passwords. On Linux, the closest practical mapping shown here is "passwd". Sets or changes a user account password. This reference is grouped under Security & Permissions → Users & Groups.

Migration tip: Running <code>passwd</code> with no arguments changes <strong>your own</strong> password. With <code>sudo passwd username</code> an admin can change anyone's password.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows net user username /passwordreq maps to passwd 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.

Practical tasks

Common use cases

Change user passwords

Sets or changes a user account password.

passwd

Change your own password

sudo passwd john

Change another user's password

passwd -l john

Lock an account (disable login)

Ready to run

Copyable Linux commands

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

passwd
sudo passwd john
sudo passwd -l john
sudo passwd -u john

Walkthrough

Examples with explanations

# Windows: net user john *  (prompts for new password)
passwd                       # change your own password
sudo passwd john            # admin: change john's password
sudo passwd -l john        # lock account (can't log in)
sudo passwd -u john        # unlock account

Reference

Common options and variations

Command or optionUse
passwdChange your own password
sudo passwd johnChange another user's password
passwd -l johnLock an account (disable login)
passwd -u johnUnlock an account
passwd -e johnForce password change on next login

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "passwd" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu same command passwd Same command on this distribution.
Fedora same command passwd Same command on this distribution.
Arch same command passwd Same command on this distribution.

Keep learning

Related Security & Permissions commands