---
name: "capng_name_to_capability"
section: "3"
platform: "linux"
package: "libcap-ng"
version: "0.9.6-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/capng_name_to_capability"
---

# capng\_name\_to\_capability(3)

convert capability text to integer

## NAME

capng\_name\_to\_capability - convert capability text to integer

## SYNOPSIS

**#include \<cap-ng.h\>**

int capng\_name\_to\_capability(const char \*name);

## DESCRIPTION

capng\_name\_to\_capability will take the string being passed and look it up to see what its integer value would be. The string being input is the same name as the define in linux/capability.h with the CAP\_ prefix removed. The string case does not matter. The integer that is output is the same as the define would be from linux/capability.h. This is useful for taking string input and converting to something that can be used with capng\_update.

## RETURN VALUE

This returns a negative number on failure and the correct define otherwise.

## SEE ALSO

[**capng\_capability\_to\_name**(3)](/capng_capability_to_name/3.md), [**capabilities**(7)](/capabilities/7.md)

## AUTHOR

Steve Grubb
