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

Windows net localgroup equivalent in Linux

Creates groups, adds users to groups, and lists group memberships.

Windows net localgroup
→
Linux equivalents
Debian/Ubuntu same command
groupadd / groups
Fedora same command
groupadd / groups
Arch same command
groupadd / groups

Overview

What this command does

On Windows, "net localgroup" is used to manage user groups. On Linux, the closest practical mapping shown here is "groupadd / groups". Creates groups, adds users to groups, and lists group memberships. This reference is grouped under Security & Permissions → Users & Groups.

Migration tip: Groups are central to Linux security. Adding a user to a group (like <code>docker</code> or <code>sudo</code>) grants them extra permissions without giving full root access.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows net localgroup maps to groupadd / groups 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.

Command-specific caution

The -a flag in usermod -aG means 'append'. Without it, the user is removed from ALL other groups. Always use -aG together.

Practical tasks

Common use cases

Manage user groups

Creates groups, adds users to groups, and lists group memberships.

groups username

List groups a user belongs to

groupadd groupname

Create a new group

usermod -aG group user

Add user to group (-a means append)

Ready to run

Copyable Linux commands

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

groups john
sudo groupadd developers
sudo usermod -aG developers john
sudo usermod -aG docker john

Walkthrough

Examples with explanations

# Windows: net localgroup Administrators john /add
groups john                      # what groups is john in?
sudo groupadd developers        # create a new group
sudo usermod -aG developers john # add john to it

# Allow john to run Docker without sudo:
sudo usermod -aG docker john
(log out and back in for changes to take effect)

Reference

Common options and variations

Command or optionUse
groups usernameList groups a user belongs to
groupadd groupnameCreate a new group
usermod -aG group userAdd user to group (-a means append)
gpasswd -d user groupRemove user from group
cat /etc/groupList all groups on the system

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "groupadd / groups" 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 groupadd / groups Same command on this distribution.
Fedora same command groupadd / groups Same command on this distribution.
Arch same command groupadd / groups Same command on this distribution.

Important

What to watch out for

The -a flag in usermod -aG means 'append'. Without it, the user is removed from ALL other groups. Always use -aG together.

Keep learning

Related Security & Permissions commands