I'm using a installation scripts that needs setcap and it's not found. What package contains it? libcap2 is already installed.

2 Answers 2


Searching for setcap

I believe setcap is contained in this package libcap2-bin. I found this by googling for "debian setcap" which led me to this man page:

The title of the man page tells you which package it resides in:

/ jessie / libcap2-bin / setcap(8)

Now that we "think" we know the package's name we can search for it:

If you scroll down to the bottom of that page you'll see all the various architectures. Click the link for amd64:

Found it

And there's setcap:

File list of package libcap2-bin in jessie of architecture amd64
  • @gabriel-a-zorrilla - if this resolves your issue please mark it as accepted so other's know your issue's been resolved.
    – slm
    Jul 16, 2018 at 11:06

Just do a search to see if a package has that command using

apt-file search setcap

if apt-file is not install first get it installed then re-issue above :

sudo apt install apt-file -y  && sudo apt-file update
apt-file search setcap

the entry you want appears as

libcap2-bin: /sbin/setcap

now you know which package has it so install using

sudo apt-get install libcap2-bin

to see contents of an installed package issue

dpkg -L some-package
dpkg -L libcap2-bin

output includes these


so now you know how to install setcap and its get counterpart getcap

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .