Languages
[Edit]
EN

Bash - list current user groups in Linux

5 points
Created by:
Maryamcc
511

In this short article we would like to show how to list groups for current user in Linux using Command Line.

Quick solution:

groups

Example output

john sudo cdrom

Explanation: we run command on Debian Linux, with logged-in john user, and he was assigned to john, sudo and cdrom groups.

Example screenshot:

Current user groups in Linux displayed in Bash.
Current user groups in Linux displayed in Bash.

 

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Bash

Bash - list current user groups in Linux
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join