Languages
[Edit]
EN

Bash - list specific user groups in Linux

2 points
Created by:
Teilsa
1105

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

Quick solution:

groups user_name

Note: by typing as second agrument user_name we indicate for what user we want to list assigned groups.

Practical example

Type following command:

groups john

Output:

john : john sudo cdrom

Explanation: we run command on Debian Linux, indicating as first argument john user, and he was assigned to johnsudo and cdrom groups.

Screenshot:

User groups in Linux displayed in Bash.
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 specific 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