groupadd Command Generator
Generate groupadd commands to create a new group
Getting Started with groupadd
## What is groupadd?
`groupadd` creates a new user group on the system. Groups are used to manage shared file permissions and to grant role-based access to services.
## How to Use
1. **Set GID** (optional): Provide a numeric group ID with `-g`. 2. **Pick Flags**: Choose `-r` for a system group, `-f` to succeed if it already exists. 3. **Enter Group Name**: Provide the new group name (the positional argument). 4. **Copy & Run**: Copy the generated command into your terminal (requires root).
Common Options
### `-g` Group ID (GID) Set a specific numeric GID. Must be unique unless `-o` is used.
### `-f` Force Exit successfully if the group already exists. Useful in idempotent provisioning scripts.
### `-o` Non-unique Allow a duplicate (non-unique) GID when combined with `-g`.
### `-r` System group Create a system group with a GID below the normal range (typically below 1000), used for service accounts.
### `-K` Override defaults Override `/etc/login.defs` key/value pairs such as `GID_MIN` and `GID_MAX`.
### `-p` Password Set an encrypted group password (rarely used; modern systems use `gpasswd`).
▶How do I create a group with a specific GID?
▶How do I make a script idempotent when creating a group?
▶What is a system group?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee