$linuxjunkies
>

getpcaps(1)

Display the capabilities of a running process.

UbuntuDebianFedoraArch

Synopsis

getpcaps <pid> [<pid> ...]

Description

getpcaps displays the capabilities of one or more running processes identified by their process IDs (PIDs). Capabilities are a fine-grained privilege mechanism in Linux that allow processes to perform privileged operations without requiring full root access.

The command shows the current, permitted, inheritable, bounding, and ambient capability sets for each process. Capabilities are represented using symbolic names (e.g., cap_net_bind_service) or numeric values.

Common options

FlagWhat it does
-h, --helpDisplay help message and exit
-v, --verboseVerbose output with additional capability details

Examples

Display capabilities of the current shell process

getpcaps $$

Show capabilities of the init process (PID 1)

getpcaps 1

Display capabilities of three processes at once

getpcaps 1234 5678 9999

Get capabilities for all nginx worker processes

ps aux | grep nginx | awk '{print $2}' | xargs getpcaps

Display capabilities of all sshd processes using pgrep

getpcaps $(pgrep sshd)

Related commands