Addgroup Linux Commands – Overview with Examples and FAQs

Introduction

The Linux command addgroup is a command line utility used to add user groups to a Linux system. It is a part of the shadow-utils package and is used to create and manage user groups. It is a powerful tool that can be used to manage user access to system resources. With addgroup, you can create new groups, add users to existing groups, and modify group settings. This command is useful for system administrators who need to manage user access to system resources.

Examples

The addgroup command is used to add a new group to the system. It is used to create a new group with a given name and a given group ID (GID).

Syntax:
addgroup [options] groupname

Options:
-g, –gid GID: Specify the group ID (GID) for the new group.
-K, –key KEY=VALUE: Override /etc/login.defs defaults.
-o, –non-unique: Allow to create groups with duplicate (non-unique) GID.
-r, –system: Create a system account.

Example:
To create a new group called “developers” with GID 1000, the command would be:

addgroup -g 1000 developers


Addgroup Linux Command

The addgroup command is a Linux utility used to add user groups to the system. It is a part of the shadow-utils package and is used to create and manage user groups. The addgroup command is used to create a new group on the system and assign it a unique group ID (GID). It can also be used to modify existing groups.

The syntax for the addgroup command is as follows:

addgroup [options] groupname

The options available with the addgroup command are as follows:

  • -g: Specify the GID of the group.
  • -f: Force the creation of the group even if it already exists.
  • -h: Specify the home directory for the group.
  • -K: Specify the key value pairs for the group.
  • -o: Allow the creation of a group with a non-unique GID.
  • -p: Specify the password for the group.
  • -R: Specify the root directory for the group.
  • -S: Specify the shell for the group.

The addgroup command is used to create a new group on the system. It is important to note that the group must have a unique GID. If the group already exists, the command will fail unless the -f option is used. The command can also be used to modify existing groups by specifying the -g, -h, -K, -p, -R, and -S options.

In conclusion, the addgroup command is a Linux utility used to add user groups to the system. It is used to create and manage user groups and can also be used to modify existing groups. The command requires a unique GID for the group and can be used with various options to modify the group.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
San Vito Al Tagliamento 33078
Pordenone Italy
Item added to cart.
0 items - 0.00
Open chat
Scan the code
Hello 👋
Can we help you?