groups—prints group membership of user

groups [ user… ]

The command groups prints on standard output the groups to which you or the optionally specified user belong.

Get Linux Shells by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.