Setcap not found in Debian 9

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

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 a package issue

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

where you will see setcap and its get counterpart getcap