getpcaps(1)
Display the capabilities of a running process.
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
| Flag | What it does |
|---|---|
-h, --help | Display help message and exit |
-v, --verbose | Verbose output with additional capability details |
Examples
Display capabilities of the current shell process
getpcaps $$Show capabilities of the init process (PID 1)
getpcaps 1Display capabilities of three processes at once
getpcaps 1234 5678 9999Get capabilities for all nginx worker processes
ps aux | grep nginx | awk '{print $2}' | xargs getpcapsDisplay capabilities of all sshd processes using pgrep
getpcaps $(pgrep sshd)