CAPTREE(8)
๐ CAPTREE(8) โ the process capability tree, bestie edition ๐
okay so this is captree from the System Manager's Manual, and it's genuinely one of my faves. sit down, hydrate, let's go ๐ซถ
โจ NAME โจ
captree โ display tree of process capabilities ๐ณ
๐ธ SYNOPSIS ๐ธ
captree [OPTIONS] [(pid|glob-name) ...]
๐ฆ DESCRIPTION ๐ฆ
captree displays the capabilities on the mentioned processes indicated by pid or glob-name value(s) given on the command line. no cap, that's literally the whole job. ๐
and here's the tea on defaults, bestie:
- if you supply no pid etc values at all,
pid=1is implied. surprise! it just picks init for you ๐ - a pid value of
0displays all the processes known to the kernel. the whole squad. every single one. ๐
The POSIX.1e capabilities are displayed in double quotes in the cap_from_text(3) format. so like, in quotes, that format, got it? โจ
The IAB tuple of capabilities is displayed between square brackets in the text format described in cap_iab(3). Both of these text formats are described in cap_text_formats(7). ๐
note bestie: the IAB tuple text is omitted if it contains empty A and B components. this is because the regular POSIX.1e text contains information about the Inheritable flag already. it's giving redundant, lowkey. ๐
and this behavior can be overridden with the --verbose command line argument. the override is RIGHT THERE, use it ๐ซถ
Optional arguments, and listen โ they must precede the list of pid|glob-name values. like, they go FIRST. no pushing in line, bestie ๐ญ
--helpโ Displays usage information and exits. Note, modern Go runtimes exit with status0in this case, but older runtimes exit with status2. yeah. the exit code depends on how vintage your Go runtime is. iconic behavior honestly ๐--verboseโ Displays capability sets and IAB tuples even when they are empty, or redundant. no more hiding the empty ones, we're showing EVERYTHING ๐--depth=nโ Displays the process tree to a depth of n. Note, the default value for this parameter is0, which implies infinite depth. yes bestie, zero means infinity here, we don't make the rules ๐--colo[u]r=falseโ Colo[u]rs the targeted PIDs, if stdout is a TTY, in red. This option defaults totruewhen running via a TTY. The--color=falseargument will suppress this color. Piping the output into some other program will also suppress the use of colo[u]r. so like โ pipe it and the red just โจevaporatesโจ, no flag needed ๐
๐ EXIT STATUS ๐
- If the supplied target cannot be found the exit status is
1. ๐ญ - Should an unrecognized option be provided, the exit status is
2. ๐ - Otherwise,
captreeexits with status0. slay ๐
๐ REPORTING BUGS ๐
Please report bugs via:
https://bugzilla.kernel.org/buglist.cgi?component=libcap&list_id=1090757
don't be shy, they wanna hear it ๐ซถ
๐ SEE ALSO ๐
cap_from_text(3), cap_text_formats(7), capabilities(7), and cap_iab(3).
There is a longer article about captree, which includes some examples, here:
https://sites.google.com/site/fullycapable/captree
go read it, iykyk ๐โจ
๐ซถ AUTHOR ๐ซถ
Andrew G. Morgan <morgan@kernel.org> โ thank you for your service, king ๐
and that's the whole page, bestie!! this one came from the System Manager's Manual and it's dated 2022-03-19 โ go forth and captree responsibly, mwah ๐๐๐ฆ๐ธ
๐ฆ where this page comes from
- alpine 3.22: libcap-doc 2.78-r0 ยท BSD-3-Clause OR GPL-2.0-only
- alpine 3.23: libcap-doc 2.78-r0 ยท BSD-3-Clause OR GPL-2.0-only
- alpine 3.24: libcap-doc 2.78-r0 ยท BSD-3-Clause OR GPL-2.0-only
- arch rolling: libcap 2.78-1 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 43: captree 2.76-3.fc43 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 43: captree 2.76-4.fc43 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 44: captree 2.77-2.fc44 ยท BSD-3-Clause OR GPL-2.0-only
- fedora 44: captree 2.78-1.fc44 ยท BSD-3-Clause OR GPL-2.0-only
- nixpkgs unstable: libcap 2.78
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms