Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any way I can list all setuid binaries inside the Ubuntu respository? Or does such a list exist somewhere on the web? I have looked at the apt-get options and could not come up with a solution for the same. I'm assuming that there must be a list for the same though.

share|improve this question
up vote 9 down vote accepted

setuid executables are not recorded in the package metadata, so a short answer to your question would be: no, you can't. The only way to look for setuid executables in an archive would be to download every package and scan them.

However, if what you want to do is to list all setuid executables installed on your system, this command is what you are looking for:

find / -type f \( -perm -4000 -o -perm -2000 \)

Then, if you want to know where an executable comes from:

dpkg -S <file-path>

For example:

$ dpkg -S /bin/ping
iputils-ping: /bin/ping
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.