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

I used sudo apt-get install mercurial to install Hg.. where did it put the executable? I need to specify the location in Netbeans.

Is there a general way to find where apt-get installs things? (Before the install would be nice, too.)

share|improve this question
up vote 10 down vote accepted

To list files installed by a package execute:

dpkg -L package

Also if the binary is at the search PATH you should be able to locate it with:

which binary_name
share|improve this answer
Awesome on both counts... thanks. /usr/bin/hg – Pete Dec 31 '10 at 2:14
Just for completeness, the inverse operation is also extremely useful -- I have a program or file, I know where it is, what package installed it? "dpkg -S <path/to/file>" will tell you. – divegeek Dec 31 '10 at 4:55

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.