EN
Bash - list specific user groups in Linux
2
points
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 tojohn
,sudo
andcdrom
groups.
Screenshot: