---
name: "PR_CAP_AMBIENT"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/PR_CAP_AMBIENT"
---

# PR\_CAP\_AMBIENT(2const)

read or change the ambient capability set of the calling thread

## NAME

PR\_CAP\_AMBIENT - read or change the ambient capability set of the calling thread

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>
```

**int prctl(PR\_CAP\_AMBIENT, long** *op***, ...);**

## DESCRIPTION

Reads or changes the ambient capability set of the calling thread, according to the value of *op*, which must be one of the following:

- **PR\_CAP\_AMBIENT\_RAISE** **PR\_CAP\_AMBIENT\_LOWER** **PR\_CAP\_AMBIENT\_IS\_SET** **PR\_CAP\_AMBIENT\_CLEAR\_ALL**

  ## RETURN VALUE

On success, a nonnegative value is returned. On error, -1 is returned, and *errno* is set to indicate the error.

## ERRORS

- **EINVAL**

  *op* is not a valid value.

## VERSIONS

Higher-level interfaces layered on top of the above operations are provided in the [**libcap**(3)](/libcap/3.md) library in the form of **cap\_get\_ambient**(3), **cap\_set\_ambient**(3), and **cap\_reset\_ambient**(3).

## STANDARDS

Linux.

## HISTORY

Linux 4.3.

## SEE ALSO

[**prctl**(2)](/prctl/2.md), [**PR\_CAP\_AMBIENT\_RAISE**(2const)](/PR_CAP_AMBIENT_RAISE/2const.md), [**PR\_CAP\_AMBIENT\_LOWER**(2const)](/PR_CAP_AMBIENT_LOWER/2const.md), [**PR\_CAP\_AMBIENT\_IS\_SET**(2const)](/PR_CAP_AMBIENT_IS_SET/2const.md), [**PR\_CAP\_AMBIENT\_CLEAR\_ALL**(2const)](/PR_CAP_AMBIENT_CLEAR_ALL/2const.md), [**libcap**(3)](/libcap/3.md), **cap\_get\_ambient**(3), **cap\_set\_ambient**(3), **cap\_reset\_ambient**(3)
