How to create a new user group?

To create a new user group in Linux, you can use the groupadd command. Here’s how to do it:

  1. Open your terminal.

  2. Use the following command to create a new group. Replace groupname with the desired name of your group:

    sudo groupadd groupname
  3. To verify that the group was created successfully, you can use the following command:

    getent group groupname

If the group was created, you should see output similar to this:

groupname:x:1001:

Make sure you have administrative privileges to create a new group. If the group already exists, the command will display an error message.

0 Comments

no data
Be the first to share your comment!