How do I find where an application is installed?

Assuming you installed it from the repos:

$ dpkg -L wireshark wireshark-common 
/.
/usr
/usr/bin
/usr/bin/wireshark
/usr/share
/usr/share/menu
/usr/share/menu/wireshark
/usr/share/pixmaps
/usr/share/pixmaps/wsicon32.xpm
/usr/share/applications
/usr/share/applications/wireshark.desktop
/usr/share/doc
/usr/share/doc/wireshark
/usr/share/doc/wireshark/copyright
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/48x48
/usr/share/icons/hicolor/48x48/apps
/usr/share/icons/hicolor/48x48/apps/wireshark.png
/usr/share/icons/hicolor/scalable
/usr/share/icons/hicolor/scalable/apps
/usr/share/icons/hicolor/scalable/apps/wireshark.svg
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/wireshark.1.gz
/usr/share/doc/wireshark/changelog.Debian.gz
/usr/share/doc/wireshark/README.Debian

/.
/usr
/usr/bin
/usr/bin/editcap
/usr/bin/text2pcap
/usr/bin/dumpcap
/usr/bin/rawshark
/usr/bin/mergecap
/usr/bin/capinfos
/usr/share
/usr/share/doc
/usr/share/doc/wireshark-common
/usr/share/doc/wireshark-common/README.Debian
/usr/share/doc/wireshark-common/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/wireshark-common
/usr/share/man
/usr/share/man/man4
/usr/share/man/man4/wireshark-filter.4.gz
/usr/share/man/man1
/usr/share/man/man1/mergecap.1.gz
/usr/share/man/man1/capinfos.1.gz
/usr/share/man/man1/dumpcap.1.gz
/usr/share/man/man1/editcap.1.gz
/usr/share/man/man1/text2pcap.1.gz
/usr/share/man/man1/rawshark.1.gz
/usr/share/doc/wireshark-common/changelog.Debian.gz

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

$ which wireshark
  /usr/bin/wireshark

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


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