Languages
[Edit]
EN

Bash - list specific user groups in Linux

2 points
Created by:
JustMike
26120

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.
Native Advertising
50 000 ad impressions - 449$
🚀
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

❤️💻 🙂

Join