List all usergroups on a Linux system

All groups configured on the local system (usually is all you need to know):

cut -d: -f1 /etc/group | sort

Really all groups including LDAP and other potential remotely controlled group assignments:

getent group | cut -d: -f1 | sort