groups(1)

groups1

Show group memberships

Usage

groups [user]

Overview

The groups utility has been obsoleted by the id(1) utility, and is equivalent to “id -Gn [user]”. The command “id -p” is suggested for normal interactive use.

The groups utility displays the groups to which you (or the optionally specified user) belong.

Exit status

The groups utility exits 0 on success, and >0 if an error occurs.

Examples

Show groups the root user belongs to:

$ groups root
wheel operator

Releases

163 releases since Mac OS X 10.0; the text changed 3 times.

  1. 10.0–10.2.8
  2. 10.3–10.4.11
  3. 10.5–12.2
  4. 12.3–26.5

From shell_cmds 329 in macOS 26.5. Parsed by carta from the page's mdoc source.