Skip to main content

Linux Group Commands

Manage group accounts and group membership in the Linux operating system.

Command
Function
Flags
groupaddCreates a new group.-g (Defines the group ID)
-p (Defines the group password)
-r (Makes the new group a system group)

groupmod

Modifies the existing group.
groupdelModifies the system account files by deleting all entries that refer to the specified group.
gpasswdChanges a group password.-r (Removes a group password)
newgrpUsed to change the current group IP during a login session.
usermodModifies group membership for the user account.

-g (Assigns a user to a primary group)

-G (Assigns a user to a secondary group)

-aG (Assigns a user to a secondary group by adding it to the list of secondary users)

-G "" (Removes the user from all secondary group memberships)

groupsDisplays the primary and secondary group membership for the specified user account.