PR_CAP_AMBIENT(2const)
π PR_CAP_AMBIENT π
okay bestie, so this one lives in section 2const of the manual pages β it's a PR_CAP_AMBIENT thing, and it's all about the ambient capability set of the calling thread. Yep. Reading it, changing it, the whole vibe. β¨
π 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, ...);
like yes it's a prctl() call, she's fancy, she takes an op and then a lil ... because she's mysterious πΈ
π¦ DESCRIPTION
So this reads or changes the ambient capability set of the calling thread, and which one it does depends entirely on the value of op. And op has to be one of these, no exceptions, no substitutions:
PR_CAP_AMBIENT_RAISEπPR_CAP_AMBIENT_LOWERπPR_CAP_AMBIENT_IS_SETπPR_CAP_AMBIENT_CLEAR_ALLπ
that's the whole list, bestie, that's the menu π
π RETURN VALUE
On success, a nonnegative value comes back. Iconic. On error, you get -1, and errno gets set to tell you what went wrong π
π ERRORS
EINVALβopis not a valid value. like girl, that's not one of the four, try again π
π VERSIONS
If you want the glow-up version of all this, there's higher-level interfaces layered on top of the operations above, and they live in the libcap(3) library, shaped like:
obsessed, honestly π
β STANDARDS
Linux. that's it, that's the standard π§
π°οΈ HISTORY
Linux 4.3. she's been around a minute π
π₯ SEE ALSO
prctl(2)PR_CAP_AMBIENT_RAISE(2const)PR_CAP_AMBIENT_LOWER(2const)PR_CAP_AMBIENT_IS_SET(2const)PR_CAP_AMBIENT_CLEAR_ALL(2const)libcap(3)cap_get_ambient(3)cap_set_ambient(3)cap_reset_ambient(3)
and that's the whole page bestie, go read those capabilities, slay π β¨
okay mwah, this was Linux man-pages 6.20, dated 2026-02-08 β love her, no cap π«Άπ
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- Copyright 2015, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms