groups(1) on Solnix vs Linux and the BSDs

On Solnix, groups is the illumos /usr/bin/groups, which takes only optional user names and has no options. Its page says it reads /etc/passwd and /etc/group. The BSD pages say groups is obsolete and equivalent to id -Gn.

What Solnix runs

A default Solnix system runs the illumos groups at /usr/bin/groups. /usr/ucb/groups is also shipped, but the bundle does not describe it. The Solnix page does not mention id(1).

Differences

Compared withTopicWhat differs
FreeBSD, OpenBSD, NetBSDdefinition of groupsThe FreeBSD, OpenBSD and NetBSD pages say groups is obsolete and equivalent to id -Gn [user]. The Solnix page gives no such equivalence and does not mention id(1). It describes groups only in terms of /etc/passwd and /etc/group.
Source: FreeBSD/OpenBSD/NetBSD groups(1) DESCRIPTION; Solnix groups(1) DESCRIPTION, SEE ALSO
LinuxoptionsLinux (GNU coreutils) groups accepts --help and --version. The Solnix SYNOPSIS is groups [user]... and lists no options.
Source: Linux groups(1) SYNOPSIS, --help, --version; Solnix groups(1) SYNOPSIS
FreeBSD, OpenBSD, NetBSDmultiple user namesThe Solnix and Linux synopses accept several user names (user..., USERNAME...). The FreeBSD, OpenBSD and NetBSD synopses show a single optional user.
Source: Solnix groups(1) SYNOPSIS; Linux groups(1) SYNOPSIS; FreeBSD/OpenBSD/NetBSD groups(1) SYNOPSIS
Linuxno-argument caseLinux reports groups for the current process, which the page says may differ from the groups database if that database has changed. The Solnix page says only that it prints the groups of 'you' and does not say which source is used.
Source: Linux groups(1) DESCRIPTION; Solnix groups(1) DESCRIPTION
FreeBSD, OpenBSD, NetBSDexit statusThe FreeBSD, OpenBSD and NetBSD pages document exit 0 on success and >0 on error. The Solnix and Linux pages have no EXIT STATUS section.
Source: FreeBSD/OpenBSD/NetBSD groups(1) EXIT STATUS; Solnix groups(1); Linux groups(1)
FreeBSD, OpenBSD, NetBSDinteractive recommendationThe BSD pages suggest id -p for normal interactive use. The Solnix page makes no such suggestion.
Source: FreeBSD/OpenBSD/NetBSD groups(1) DESCRIPTION; Solnix groups(1)
Linuxgroup data sourceThe Solnix page says the primary group comes from /etc/passwd and other groups from /etc/group. The Linux page names no files and points to getent(1) under SEE ALSO.
Source: Solnix groups(1) DESCRIPTION; Linux groups(1) SEE ALSO

Standards

  • POSIX: groups is not a POSIX.1-2024 utility.

Writing portable scripts

  • Call groups with no options, and with at most one user name, in portable scripts. Linux adds --help and --version, and the BSD synopses take only one user.
  • Do not rely on groups being present or documented everywhere: the BSD pages call it obsolete in favour of id -Gn. Use id -Gn only if you have confirmed it exists on all targets.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.