Languages
[Edit]
EN

Bash - list current user groups in Linux

5 points
Created by:
JustMike
28980

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.

 

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