I installed wireshark recently. I have no idea in which directory it was installed, but it's not in /opt.

How do I find where it's installed?


5 Answers 5


Assuming you installed it from the repos:

$ dpkg -L wireshark wireshark-common 


which wireshark will lead you to the executable. The output could ressemble this :

$ which wireshark

Software never gets installed into /opt unless you yourself do that.

  • it only works in this particular case. what if I was to install "my super program", how would I find its path? Jul 2, 2013 at 15:22
  • @AlanDert which "my super program" will work. As will locate locate "my super program".
    – Panther
    Jul 2, 2013 at 16:16
  • @AlanDert why would it not work? :) which checks the current environment so it will find it if you can execute it.
    – Rinzwind
    Jul 2, 2013 at 16:42
  • Some packages do install in /opt, though none in the main repositories do this. Examples: Google Chrome, Adobe Reader (Canonical partner repository), Spotify, etc. Please also note that it is even an requirement to install in /opt for MyApps (extras.ubuntu.com). developer.ubuntu.com/publish/my-apps-packages
    – gertvdijk
    Jul 2, 2013 at 22:05
  • This answer is mostly wrong. which program-name returns the path to the executable, which can be completely different from the install location of a program(e.g. there is /usr/bin/inkscape but the installation is in /usr/share/inkscape). They are identical iff the program is a single executable without any need for system-wide resources/extensions/configurations.
    – Bakuriu
    Jul 3, 2013 at 8:21

I would recommend going with @Oli's answer, if that works for you. For applications that you (for whatever reason) didn't install with the

You can examine the unity launcher icon, it may be able to tell you:

The launcher file will usually be located in /usr/share/applications/, and named something like my-application-launcher.desktop. If you don't know exactly what the file is called, use ls to examine the directory. (For your specific one, it is called wireshark.desktop.)

Once you know which one it is, examine its contents (anything from cat to gedit will work, but if you use gedit make sure to do it as gksu gksu gedit, not sudo gedit).

The file will contain an entry with something like Exec=command or Exec=/path/to/script.sh. If it only has a command, you can use which or locate (like @Rinzwind said) to get the full path for it. Another option is to use whereis to find the binary or source location.

The directory containing the launcher's target should be the installation directory for the program. If the launcher points to a shell script, sometimes examining its contents can reveal additional locations, if needed.

Running gksu nautilus when you get there will give you a windowed file browser with root permissions, meaning you can use it to copy/delete/edit any file, since normally installations are protected and will prevent you from modifying files as a normal user.

If that doesn't work, another option is to use find, to find anything with the same name, or grep, to find files containing the name.

However, you should only do this if you don't have any better alternatives. This can be a slow, tedious, mind-numbing process, especially since sometimes there is more than one location that stuff is installed to. If you can, use some other method.


if nothing of the above works try locate. To do a locate-search on up to date information run updatedb before.

for more information, consult man locate and man updatedb


locate keyword is best choice to check the installation directory of the program, look at the initial lines in the result of locate wireshark, and it will tell you all you require.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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