How to find out what group a given user has?

command-line, linux, system-administration, unix

Solution

groups

or

groups user

Problem

In Unix/Linux, how do you find out what group a given user is in via command line?

Original source