Add User Group in Linux: Quick Guide
You can add a user group in a Linux system using the following command:
- Open the terminal and log in as the root user.
- Create a new user group using the following command:
sudo groupadd <group_name>
Replace
- To confirm if the user group has been created successfully, you can use the following command to check:
cat /etc/group
- To add an existing user to a newly created user group, you can use the following command:
sudo usermod -aG <group_name> <username>
Replace
By following these steps, you can successfully add a new user group in the Linux system.