• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Thetechhacker

Simplify your tech life.

  • News
  • Best
  • Guides
    • Android
    • iOS
    • Windows
    • Mac
    • Linux
    • Internet
    • Cryptocurrency
    • VPN
  • Reviews
Home / Guides / Linux

Muhammed Swalih / Nov 9, 2016

Linux Add User to Group

linux-add-user-to-group

Adding a user to a group is a fairly simple task. It is not that difficult like coding an entire program in the prompt. But, most of the beginners are unaware of the commands and steps to do so. So, in this article on “Linux Add User to Group,” we are going to list the complete step by step procedure. Have a look at a detailed guide below.

Add a New Group to Linux

Before starting, it is necessary to add a group to the Linux if you don’t already have one. You can do that by typing this code in the terminal.

groupadd <groupname>

Linux Add User to Group

To add a user to an existing group, use the following commands.

usermod -a -G <groupname> username

Replace the groupname and username with the correct names of the group and user.

Change User’s Group

If the user and group already exist and you want to switch the user to a different group, use the following command.

usermod -g <groupname> username

Replace the appropriate names as you done before.

Add a User to Multiple Groups at the same time

There are instances where you want to add the same user to multiple groups. To do this, use the following command in the terminal.

usermod -a -G ftp,admins,secondgroup <username>

Here, we just added a comma in between the user groups. Replace the user groups with the correct names.

That’s all that you have to do to create and manage users and groups in Linux. If you faced any problems in the process or need help regarding it, feel free to ask through the comments.

That’s all for now. Hope you liked the article, please don’t forget to share on your social media platforms. Also, please do share your views and feedback in the comment box below.

Tagged With: Linux Tips and Tricks

How to Find out How much RAM is Installed in Ubuntu

Primary Sidebar

Related Articles

Footer

Thetechhacker-Logo

Website

  • About us
  • Advertise
  • App Review Program
  • Our Services
  • Contact Us

Policies

  • Disclosure
  • Privacy Policy
  • Terms and Conditions

Copyright © 2025 · Thetechhacker

This site uses cookies to serve you better. By continuing to use this website, you agree to our cookie and Privacy Policy.