In Linux you can assign user accounts to one or more groups and thus control file permissions or access to directories. This is important, because not every user should be able to use the same rights within an operating system.

If you want to add a user to a group within the Linux operating system, you may ask yourself how you can best do this. We would like to explain to you here, how you proceed thereby best under Linux.

To assign a user to a group under Linux

How to add user to group - Linux

1. Open the terminal for example by CTRL + ALT + T

2. Now use the following command

  • Sudo usermod -a -G group username

Here, "group" must be replaced by the group to which the user is to be assigned.  The "username" must be replaced with the user you want to assign to the group.


You want to assign the user "Max" to the group "Spickipedia". Then the command would be as follows:

  • Sudo usermod -a -G Spickipedia Max

You have now successfully assigned a user to a specific group.

If you have not yet created a group on Linux, then you can quickly create one as follows:

How to create a new group on Linux

To create a new group on your system, use the following command:

  • sudo groupadd group

Here, replace "group" with the name of the new group.


  • sudo groupadd Spickipedia

With this, you have now created a new group in Linux and can assign users there using the above method.

You now know the procedure for assigning users to a group in Linux.

{tag}link rel="alternate" href="" hreflang="de" {/tag}
{tag}link rel="alternate" href="" hreflang="en" {/tag}
{tag}link rel="alternate" href="" hreflang="fr" {/tag}
{tag}link rel="alternate" href="" hreflang="es" {/tag}

Add comment