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

Windows PowerShell Add-LocalGroupMember equivalent in Linux

Adds an existing user to a supplementary group.

Windows PowerShell Add-LocalGroupMember
→
Linux equivalents
Debian/Ubuntu same command
sudo usermod -aG GROUP USER
Fedora same command
sudo usermod -aG GROUP USER
Arch same command
sudo usermod -aG GROUP USER

Overview

What this command does

On Windows, "PowerShell Add-LocalGroupMember" is used to add a user to a group. On Linux, the closest practical mapping shown here is "sudo usermod -aG GROUP USER". Adds an existing user to a supplementary group. This reference is grouped under PowerShell Equivalents → Users & Groups.

Migration tip: The <code>-a</code> flag is essential: it appends the group instead of replacing all existing supplementary memberships.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows PowerShell Add-LocalGroupMember maps to sudo usermod -aG GROUP USER 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.

Elevated privilege appears in this workflow

At least one example uses sudo. Confirm the target path, device, service or package before running the elevated form; do not add sudo simply to bypass an unexplained permission error.

Command-specific caution

Omitting -a can remove the user from other supplementary groups.

Practical tasks

Common use cases

Add a user to a group

Adds an existing user to a supplementary group.

sudo usermod -aG wheel alice

Add Alice to wheel

sudo usermod -aG docker alice

Add Alice to Docker group

groups alice

Verify memberships

Ready to run

Copyable Linux commands

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

sudo usermod -aG wheel alice
sudo usermod -aG docker alice
groups alice

Walkthrough

Examples with explanations

sudo usermod -aG wheel alice # add a user to wheel
sudo usermod -aG docker alice # add a user to the Docker group
groups alice # verify the result

Reference

Common options and variations

Command or optionUse
sudo usermod -aG wheel aliceAdd Alice to wheel
sudo usermod -aG docker aliceAdd Alice to Docker group
groups aliceVerify memberships

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "sudo usermod -aG GROUP USER" 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 sudo usermod -aG GROUP USER Same command on this distribution.
Fedora same command sudo usermod -aG GROUP USER Same command on this distribution.
Arch same command sudo usermod -aG GROUP USER Same command on this distribution.

Important

What to watch out for

Omitting -a can remove the user from other supplementary groups.

Keep learning

Related PowerShell Equivalents commands