groups(1b) on Solnix vs Linux and the BSDs
The Solnix groups(1b) page documents /usr/ucb/groups, the BSD-compatibility version, and marks it obsolete. Like the BSD pages, it prints a user's groups. Unlike the BSD pages, it accepts several user names, and it does not point to id(1) as the replacement.
The manual pages
- Solnix: groups(1b) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: groups(1) coreutils-full-9.11
- FreeBSD: groups(1) 15.1-RELEASE
- OpenBSD: groups(1) 8.0
- NetBSD: groups(1) 11.0
What Solnix runs
The header says the command on PATH is the illumos /usr/bin/groups, and that /usr/ucb/groups is also shipped. The bundle contains only the groups(1b) page, whose SYNOPSIS is /usr/ucb/groups. It does not include a page for /usr/bin/groups, so any difference between the two variants is not documented here.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD, OpenBSD, NetBSD | multiple user names | The Solnix synopsis is /usr/ucb/groups [user]..., so it accepts several users. The FreeBSD, OpenBSD and NetBSD synopses are groups [user], with one optional user.Source: Solnix groups(1b) SYNOPSIS; FreeBSD/OpenBSD/NetBSD groups(1) SYNOPSIS |
| FreeBSD, OpenBSD, NetBSD | relation to id(1) | The BSD pages say groups is obsoleted by id(1) and equivalent to id -Gn [user]. They suggest id -p for interactive use. The Solnix page says only that the command is obsolete. It does not name id or give an equivalent.Source: Solnix groups(1b) NOTES; FreeBSD/OpenBSD/NetBSD groups(1) DESCRIPTION |
| Linux | options | Linux groups (GNU coreutils) documents --help and --version. The Solnix groups(1b) synopsis shows no options.Source: Linux groups(1) SYNOPSIS, DESCRIPTION; Solnix groups(1b) SYNOPSIS |
| Linux | no-argument behaviour | With no user name, Linux groups reports on the current process. The page says this may differ from the stored groups if the groups database has changed. The Solnix page says only that it shows the groups you belong to, and does not mention processes. Source: Linux groups(1) DESCRIPTION; Solnix groups(1b) DESCRIPTION |
| FreeBSD, OpenBSD, NetBSD | exit status | The BSD pages document exit 0 on success and >0 on error. The Solnix groups(1b) page has no EXIT STATUS section, so the manual does not say what it returns on error, for example for an unknown user. Source: FreeBSD/OpenBSD/NetBSD groups(1) EXIT STATUS; Solnix groups(1b) (no EXIT STATUS section) |
| all four | where group membership comes from | The Solnix page says a user's group is set in /etc/passwd, with other groups possibly in /etc/group. The Linux page points to getent(1). The BSD pages name no source files.Source: Solnix groups(1b) DESCRIPTION; Linux groups(1) SEE ALSO; FreeBSD/OpenBSD/NetBSD groups(1) DESCRIPTION |
Standards
- POSIX: groups is not a POSIX.1-2024 utility.
- Solnix: The page is in section 1b and its NOTES say "This command is obsolete." It has no STANDARDS or ATTRIBUTES section in the bundle.
Writing portable scripts
- Use id
-Gn[user] instead of groups. The FreeBSD, OpenBSD and NetBSD pages give it as the equivalent. The bundle does not include the id pages, so check its options on each target. - Pass one user name per call. The BSD synopses accept only one.
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.