krb5-config(1)

krb5-config1

Tool for linking against mit kerberos libraries

Usage

krb5-config [{--help | --all | --version | --vendor | --prefix | --exec-prefix | --defccname | --defktname | --defcktname | --cflags | --libs [libraries]}]

Overview

krb5-config tells the application programmer what flags to use to compile and link programs against the installed Kerberos libraries.

Options

--help

prints a usage message. This is the default behavior when no options are specified.

--all

prints the version, vendor, prefix, and exec-prefix.

--version

prints the version number of the Kerberos installation.

--vendor

prints the name of the vendor of the Kerberos installation.

--prefix

prints the prefix for which the Kerberos installation was built.

--exec-prefix

prints the prefix for executables for which the Kerberos installation was built.

--defccname

prints the built-in default credentials cache location.

--defktname

prints the built-in default keytab location.

--defcktname

prints the built-in default client (initiator) keytab location.

--cflags

prints the compilation flags used to build the Kerberos installation.

--libs [library]

prints the compiler options needed to link against library. Allowed values for library are:

krb5Kerberos 5 applications (default)
gssapiGSSAPI applications with Kerberos 5 bindings
kadm-clientKadmin client
kadm-serverKadmin server
kdbApplications that access the Kerberos database

Examples

krb5-config is particularly useful for compiling against a Kerberos installation that was installed in a non-standard location. For example, a Kerberos installation that is installed in /opt/krb5/ but uses libraries in /usr/local/lib/ for text localization would produce the following output:

shell% krb5-config --libs krb5
-L/opt/krb5/lib -Wl,-rpath -Wl,/opt/krb5/lib -L/usr/local/lib -lkrb5 -lk5crypto -lcom_err

Releases

13 releases since Debian 3.0 (Woody); the text changed 9 times.

  1. 3.0
  2. 3.1–4.0
  3. 5.0
  4. 6.0
  5. 7
  6. 8
  7. 9
  8. 10–12
  9. 13
  10. Arch

--all since Debian 13 (Trixie); --cflags since Debian 3.1 (Sarge); --defccname since Debian 13 (Trixie); --defcktname since Debian 13 (Trixie); --defktname since Debian 13 (Trixie); --exec-prefix since Debian 3.1 (Sarge); --help since Debian 13 (Trixie); --libs since Debian 3.1 (Sarge); --prefix since Debian 3.1 (Sarge); --vendor since Debian 13 (Trixie); --version since Debian 13 (Trixie).

Author

MIT

From krb5 1.22.2-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.