How-To Geek

See Which Groups Your Linux User Belongs To

When you are using a linux system, it’s useful to find out what groups you belong to, so you can understand whether you have access to files and directories. This is one of the simplest commands possible. I’m using Ubuntu linux, but this command should work on most varieties of linux.

groups <username>

If you don’t enter a username, it defaults to your own username. For instance:

geek@ubuntuServ:$ groups
geek adm dialout cdrom floppy audio dip video plugdev lpadmin scanner admin fuse

You can also check the groups for any other user, including root:

geek@ubuntuServ:$ groups root
root : root fuse

I used this command recently to make sure that my user account was part of the “fuse” group, when I was getting sshfs set up. Very useful.

Want to Learn More? Get Linux Training from the Linux Foundation

Learn everything you could want to know about Linux with comprehensive online Linux courses and certification tests that include the real-world experience and first-hand knowledge of what it takes to be a successful Linux developer or system administration professional, all from a web browser in the comfort of your home.

The Linux Foundation is the nonprofit consortium dedicated to fostering the growth of Linux. Founded in 2000, they are supported by the leading technology companies and developers from around the world.

See All Linux Foundation Courses

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 12/15/06

Comments (3)

  1. Omair

    Thank you so much dude that really helped. I was trying to implement user rights based on groups because i several people that wanted to run one single service with maximum rights and all of them belong to the QA group.

    Now the issue is resolved and yes your command groups helped me to identify the group of various users.

  2. Fernando

    Very helpfull :)

  3. seb

    And for show users some one group ?

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!