Linux Remove User From Group – 2 Easy Methods

 

linux remove user from group

On Linux, you can remove a user from a group with:

1. Using the gpasswd Command

1. Press CTRL+ALT+T to open the terminal.

2. Run the “groups username” command to list the current groups of the specified user.

3. Type “sudo gpasswd -d username groupname” and hit Enter.

removing user from group using gpasswd command on Linux

2. Using the deluser Command

1. Type “sudo deluser username groupname” and hit Enter.

2. Execute the “groups username” command for verification.

removing user from group using deluser command on linux