How To Add A User To A Group In Linux: A Step-By-Step Guide

Linux may not be as commonplace at the consumer level as operating systems like Windows or macOS, butthere are several reasonswhy people who use it sing its praises. It’s a highly customizable interface, and that extends to user profiles and groups.

As you might expect, user profiles in Linux can be tailored to the needs of their assigned users — which includes determining what a given user is allowed to access within the system. In other words, it’s kind of like a custom clearance level you can set up for individuals (or even multiple profiles for the same person, if you want) that determine what files and information they can access.

script language on laptop screen

Groups serve a similar purpose, but work in a more overarching sense. So rather than going in and changing permissions for individual user accounts one-by-one, you’re able to set up a group with predefined permissions and then assign various users to said group in order to give them all the same level of access (and restrictions). A user can be added to more than one group, too, so if you need to give someone more permissions than one group allows you can use another group to make up the difference.

Managing groups

All of your work in creating and managing groups, assigning user profiles, and so on can be done using Linux’s terminal window. Here’s how.

You can reuse this process and various other permission commands for any and all users, groups, and directory combinations you want.

person coding on computer

Adding or moving users to groups

With your groups and permissions set up, managing individual user profiles across various groups should be a breeze.

If you ever need a reminder of what groups you already have made, you can type in “getent group” to pull up a complete list.