groups

Print group memberships for a user. See also: groupadd, groupdel, groupmod. More information: <https://www.gnu.org/software/coreutils/groups>.

Install

All systems
curl cmd.cat/groups.sh
Debian Debian
apt-get install coreutils
Ubuntu
apt-get install coreutils
Alpine
apk add shadow
Arch Arch Linux
pacman -S shadow
image/svg+xml Kali Linux
apt-get install coreutils
CentOS
yum install coreutils
Fedora
dnf install coreutils
Windows (WSL2)
sudo apt-get update sudo apt-get install coreutils
OS X
brew install coreutils
Raspbian
apt-get install coreutils
Docker
docker run cmd.cat/groups groups powered by Commando

Print group memberships for a user. See also: groupadd, groupdel, groupmod. More information: <https://www.gnu.org/software/coreutils/groups>.

  • Print group memberships for the current user:
    groups
  • Print group memberships for a list of users:
    groups username1 username2 ...

© tl;dr; authors and contributors