gpasswd
user managementLinux/Unix
The gpasswd command is one of the most frequently used commands in Linux/Unix-like operating systems. gpasswd Administer the /etc/group file
Quick Reference
Command Name:
gpasswd
Category:
user management
Platform:
Linux/Unix
Basic Usage:
gpasswd [options] [arguments]
Common Use Cases
Syntax
gpasswd [option] group
Options
Option | Description |
---|---|
-a, --add user |
Add user to the specified group |
-d, --delete user |
Remove user from the specified group |
-h, --help |
Display help message and exit |
-A, --administrators user,... |
Set the list of administrators for the group |
-M, --members user,... |
Set the list of members for the group |
-r, --remove-password |
Remove the group's password |
-R, --restrict |
Restrict access to the group to its members |
Examples
How to Use These Examples
The examples below show common ways to use the gpasswd
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
gpasswd developers