GETCONF(1) General Commands Manual GETCONF(1)

getconfget configuration values

getconf system_var

getconf path_var path

getconf -a [path]

In the first synopsis form, getconf prints the system variable specified by the system_var operand. Which are obtained, in order, by: sysconf(3); confstr(3); limits.h(0).

In the second synopsis form, getconf prints the variable specified by the path_var operand for the path specified by the path operand. Which are obtained via pathconf(3).

When -a is set getconf prints all the known system and path variables. If path is unspecified, getconf behaves as if it was set to ‘.

If the specified variable is found, it is printed out as-is, when it isn't found but valid it is printed as "undefined".

When -a is used, each variable is printed on a line in "name: value" format, with "value" being ‘undefined’ when not found.

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

Getting the maximum amount of supplemental groups:

getconf NGROUPS_MAX

Getting the maximum amount of bytes a filename can hold in the current directory:

getconf NAME_MAX ./

limits.h(0p), confstr(3), pathconf(3), sysconf(3)

Except for it's lack of support of the -v specification argument, getconf should be compliant with the IEEE Std 1003.1-2024 (“POSIX.1”) specification.

The -a option was added in 0001808: Add option -a to getconf utility - Austin Group Issue Tracker

Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>

March 17, 2025 Linux