---
name: "keyutils"
section: "7"
platform: "linux"
package: "keyutils"
version: "1.6.3-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/keyutils"
---

# keyutils(7)

in-kernel key management utilities

## NAME

keyutils - in-kernel key management utilities

## DESCRIPTION

The **keyutils** package is a library and a set of utilities for accessing the kernel **keyrings** facility.

A header file is supplied to provide the definitions and declarations required to access the library:

**#include \<keyutils.h\>**

To link with the library, the following:

**-lkeyutils**

should be specified to the linker.

Three system calls are provided:

- [**add\_key**(2)](/add_key/2.md)

  Supply a new key to the kernel.

- [**request\_key**(2)](/request_key/2.md)

  Find an existing key for use, or, optionally, create one if one does not exist.

- [**keyctl**(2)](/keyctl/2.md)

  Control a key in various ways.  The library provides a variety of wrappers around this system call and those should be used rather than calling it directly.

See the [**add\_key**(2)](/add_key/2.md), [**request\_key**(2)](/request_key/2.md), and [**keyctl**(2)](/keyctl/2.md) manual pages for more information.

The **keyctl**() wrappers are listed on the [**keyctl**(3)](/keyctl/3.md) manual page.

## UTILITIES

A program is provided to interact with the kernel facility by a number of subcommands, e.g.:

**keyctl add user foo bar @s**

See the [**keyctl**(1)](/keyctl/1.md) manual page for information on that.

The kernel has the ability to upcall to userspace to fabricate new keys.  This can be triggered by **request\_key**(), but userspace is better off using **add\_key**() instead if it possibly can.

The upcalling mechanism is usually routed via the [**request-key**(8)](/request-key/8.md) program.  What this does with any particular key is configurable in:

*/etc/request-key.conf*\
 */etc/request-key.d/*

See the [**request-key.conf**(5)](/request-key.conf/5.md) and the [**request-key**(8)](/request-key/8.md) manual pages for more information.

## SEE ALSO

[**keyctl**(1)](/keyctl/1.md), [**keyctl**(3)](/keyctl/3.md), [**keyrings**(7)](/keyrings/7.md), [**persistent-keyring**(7)](/persistent-keyring/7.md), [**process-keyring**(7)](/process-keyring/7.md), [**session-keyring**(7)](/session-keyring/7.md), [**thread-keyring**(7)](/thread-keyring/7.md), [**user-keyring**(7)](/user-keyring/7.md), [**user-session-keyring**(7)](/user-session-keyring/7.md), [**pam\_keyinit**(8)](/pam_keyinit/8.md)
