Languages
[Edit]
EN

Bash - list specific user groups in Linux

2 points
Created by:
JustMike
27970

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 john, sudo and cdrom groups.

Screenshot:

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