Linux – how to remove user from a group

To remove a user from a group on Linux, one can use gpasswd or deluser. Here are sample commands.

Using gpasswd

To remove user1 from group docker on any Linux

$ sudo gpasswd -d user1 docker
Removing user user1 from group docker

Using deluser (Ubuntu)

To remove user1 from group docker on Ubuntu Linux

$ sudo deluser user1 docker
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments