Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

Add and Delete Users in the Group Easily on Ubuntu

Learn the key facts about Add and Delete Users in the Group Easily on Ubuntu, with clear context, practical guidance, and useful takeaways.

Table of Contents

This updated guide examines Add and Delete Users in the Group Easily on Ubuntu and organizes the essential facts, background, and practical takeaways in clear American English.

However, when administering your system, you may encounter a situation where you need to add users to a group. It's easy to add or remove users from a group on Ubuntu. If you don't know how to do it, follow the following article.

Which groups are used for Linux?

Groups in Linux are exactly a collection of users. They are used to manage permissions on some users instead of modifying them on a per user basis. It is important to understand this concept because it is used across all Unix-like operating systems, not just Linux.

A user needs to belong to at least one group. This is the main group of that user. A user can and usually belongs to other groups, called secondary groups. There is usually a limit to the number of groups the user can be in.

Of course, groups are not the only way to handle rights in Linux. To handle permissions on a per-user basis, see the TipsMake.com instructions for decentralizing file access with the chmod command.

Add users to the group in Ubuntu

There are two commands you should know when you want to add users to a group on Linux. These are commandsgroupsandusermodcommands. Thegroupscommand allows you to see which groups you have specified. Simply run the following command:

groups

Before adding users to a group, you should make sure that the user actually exists. To do this, you can use thegetentcommand. To list all groups, run the following command:

getent group

You will see a list of groups, as well as which users are assigned to them.

Add and Delete Users in the Group Easily on Ubuntu — contextual image 1

To add users to a group, use theusermodcommand. Usually, you do this with a command like this:

sudo usermod -a -G group username

With the above command, replace the group with the name of the group you want to add users and replace the username with the user's name. For example:

sudo usermod -a -G sudo kwouksudo usermod -a -G sudo kwouk

This will allow kwouk users to use the sudo command . Because only users in that group can use sudo, you can only run theusermodcommand if you already have that group.

Although this tutorial focuses on Ubuntu, to add users to a group on other distributions, you can apply the same steps.

Create a new group in Ubuntu

Sometimes, you will encounter a situation where you need to add a user to a group, but that group does not exist. In this case, you will need to manually create the group, this is at thegroupaddcommand to promote the role.

This command is very easy to use. Simply run it under sudo with the name of the group you want to create. For example:

sudo groupadd newgroup

Add and Delete Users in the Group Easily on Ubuntu — contextual image 2

The above command will create a group called 'newgroup'. It may be very rare for you to run this command, but installing certain software may require you to create new groups. To add a user to a group you just created, use the same steps outlined above.

Add and Delete Users in the Group Easily on Ubuntu — contextual image 3

Delete the user from the group in Ubuntu

Now, you know how to add users to a group on Linux, but what about deleting them from a group? This may be different on Linux distributions, but fortunately, removing users from a group on Ubuntu is easy.

Thedelusercommand, as its name implies, is often used to completely delete a user. You can also use it on Ubuntu to delete users from a group, as well as on other distributions like Debian, where this package is also available. To remove a user from a group, use the following command:

sudo deluser username groupname

Always make sure to check if the group name is available. If you run the command without a group name, the command will only delete that user completely. For example, the following command will delete the user from the sudo group.

sudo deluser kwouk sudo

If you omit the last part 'sudo' in the above command, the user named 'kwouk' will be deleted completely.

Add and Delete Users in the Group Easily on Ubuntu — contextual image 4

It's best to check the groups that the user has been assigned. To do this, simply run the following command:

sudo groups username

An easier way to add and delete users from the group

Many people like to use a graphical tool on Ubuntu to add users and delete them from groups. If you often need to do this and don't like working on the command line, the following method can make your work much easier. Fortunately, this method is not only feasible but also easy to implement.

To do this, you will need to install the 'gnome-system-tools' package , which contains several different utilities.

We only care about the 'Users and Groups' application , but still need to install the entire package. To do this, run the following command:

sudo apt install gnome-system-tools

Add and Delete Users in the Group Easily on Ubuntu — contextual image 5

Provide Yes for the prompt, then wait for the download and installation packages. After installation is complete, launch the Users and Groups application .

Add and Delete Users in the Group Easily on Ubuntu — contextual image 6

On the left side, you will see a list of users on the system. To add and remove users from the group, click Manage Groups . You will see a list of all available groups in your Ubuntu installation. Add users to the group by clicking on Properties and checking the box next to their name. Delete users from groups by unchecking the corresponding box.

Add and Delete Users in the Group Easily on Ubuntu — contextual image 7

The origin of Unix dates back to the 1970s and Linux continues to grow today. This does not just mean better hardware support and performance. As Linux grows, we have seen more ways to manage users and permissions.

Ubuntu 19.10 brings the version of Gnome 3.32, with additional application control. This allows you to use smartphone application permissions. Although this feature is still in its infancy, it eventually made the Linux desktop more secure. To explore other new things, see TipsMake.com 's guide to upcoming new features in Ubuntu 19.10.

FAQ

What is Add and Delete Users in the Group Easily on Ubuntu about?

It provides a structured overview of Ubuntu, explains the main context, and highlights practical takeaways for readers.

Why does this topic matter?

Understanding the main concepts helps readers evaluate the issue, avoid common mistakes, and make better-informed decisions.

How should readers use this information?

Use the guidance as a practical starting point, confirm details that may have changed, and follow current product, safety, or security recommendations.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.