/etc/group file contains all groups available on the Linux systems. You can read all groups available with cat /etc/group command. To find out into which linux group you belong to you can use a following command:


another way to access your personal group information is with id command:


id command will return group names you belong to as well as group numbers. to add a user to a group on your linux systems type ( only as a root ):

# usermod -G group-name user-name

Previous command will add user-name user to a group group-name. If the group does not exists you will get a following error:

usermod: unknown group group-name

In this case you can create a new group with ( only as a root ):

# groupadd group-name

There is also another way to add user to a group manually by editing /etc/group file, but this is not recommended.

Free Linux eBooks

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top