Current user groups:

groups

Other user's groups:

groups username

Linux / Unix: groups Command Examples - nixCraft