getconf(1) on Solnix vs Linux and the BSDs
On Solnix, getconf is the illumos getconf at /usr/bin/getconf. It takes -v specification and -a, as POSIX does, and the ksh93 built-in adds many more options. Unlike FreeBSD, OpenBSD and NetBSD, the page documents a ksh93 form that can also set values and list variables by call or standard prefix.
The manual pages
- Solnix: getconf(1) from
pkgs.solnix.illumos-world-man· illumos.org - FreeBSD: getconf(1) 15.1-RELEASE
- OpenBSD: getconf(1) 8.0
- NetBSD: getconf(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
getconf
What Solnix runs
A default Solnix system runs the illumos /usr/bin/getconf. /usr/xpg4/bin/getconf and /usr/xpg6/bin/getconf are also shipped with the same synopsis. The page also documents a ksh93 built-in getconf. It is used when getconf is run without a path prefix and the search finds /bin/getconf or /usr/bin/getconf. It accepts -abdlpqrtw, -c, -n, -s, -v and long options. The bundle does not say how the xpg4/xpg6 variants differ from /usr/bin/getconf.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | ksh93 built-in options | The Solnix page documents a ksh93 built-in getconf with -b, -c, -d, -l, -n, -p, -q, -r, -s, -t, -w and long forms. The BSD pages document only -a and -v (FreeBSD), -L, -l and -v (OpenBSD), or -a (NetBSD). The bundle has no Linux page.Source: Solnix getconf(1) SYNOPSIS and OPTIONS (ksh93); FreeBSD/OpenBSD/NetBSD getconf(1) SYNOPSIS |
| OpenBSD | -l meaning | In the Solnix ksh93 built-in, -l lists variable names in lower case. On OpenBSD, -l lists the variables that need no pathname, and -L lists those that need one. Solnix /usr/bin/getconf has neither.Source: Solnix getconf(1) OPTIONS (ksh93) -l; OpenBSD getconf(1) -L, -l |
| FreeBSD, OpenBSD, NetBSD | setting values | In the ksh93 built-in, giving a value changes the process-local value of a writable variable. Readonly variables cannot be changed. The BSD pages describe only querying. Source: Solnix getconf(1) DESCRIPTION (ksh93); FreeBSD/OpenBSD/NetBSD getconf(1) DESCRIPTION |
| FreeBSD, NetBSD | -a output and pathname | Solnix /usr/bin/getconf -a writes only the names of the system configuration variables, and takes no file argument. FreeBSD getconf -a [file] reports path variables for a file. NetBSD getconf -a [pathname] prints name = value pairs.Source: Solnix getconf(1) DESCRIPTION and OPTIONS -a; FreeBSD getconf(1) SYNOPSIS; NetBSD getconf(1) DESCRIPTION |
| FreeBSD | -v environment | FreeBSD documents -v environment as currently doing nothing. Solnix says -v gives the specification that governs the selection of values. The Solnix text in the bundle does not list valid specification names.Source: FreeBSD getconf(1) Programming Environments; Solnix getconf(1) OPTIONS -v |
| NetBSD | -v support | The NetBSD synopsis has no -v option. Solnix, FreeBSD and OpenBSD all accept -v.Source: NetBSD getconf(1) SYNOPSIS; Solnix getconf(1) SYNOPSIS |
| OpenBSD | synopsis shape | OpenBSD uses one form, getconf [-Ll] [-v specification] name [pathname]. Solnix /usr/bin/getconf keeps separate system_var and path_var pathname forms, and path_var is limited to a listed set such as NAME_MAX, PATH_MAX and PIPE_BUF.Source: OpenBSD getconf(1) SYNOPSIS; Solnix getconf(1) SYNOPSIS and OPERANDS path_var |
| FreeBSD, NetBSD | variable naming | FreeBSD strips _CS_ from confstr names, so _CS_PATH is queried as PATH. NetBSD strips _SC_ and _PC_ and ignores leading underscores. Solnix lists CS_PATH as a system_var, not PATH. Source: FreeBSD getconf(1) DESCRIPTION; NetBSD getconf(1) DESCRIPTION; Solnix getconf(1) OPERANDS system_var |
| FreeBSD, OpenBSD, NetBSD | undefined values | Solnix ksh93 getconf prints undefined for a valid but undefined name. An invalid name gives a diagnostic on standard error and a non-zero exit. FreeBSD also prints undefined. OpenBSD and NetBSD pages do not say. Source: Solnix getconf(1) DESCRIPTION (ksh93); FreeBSD getconf(1) DESCRIPTION |
Standards
- POSIX: getconf is a POSIX.1-2024 utility.
- FreeBSD: getconf is expected to be compliant with IEEE Std 1003.1-2001 (“POSIX.1”).
- OpenBSD: getconf is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification. The flags [
-Ll] are extensions. - NetBSD: getconf conforms to IEEE Std 1003.2-1992 (“POSIX.2”).
Writing portable scripts
- Use only the plain getconf name and getconf path_var pathname forms. Avoid
-a,-land-L: their output and meaning differ between systems. - Do not rely on
-v. Its effect differs and NetBSD does not list it.
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.