How to find location of program on linux

How to find location of program on linux

One of my friend asked me about this, how to show the location of installed program on linux? In this article i will show you how to find the location of program on linux.

There are at least two command that can be use to show location of installed program, to show binary location of a program you can use which and whereis command. These two commands comes with xubuntu/ubuntu out of the box, so no installation needed.
which [program-name]
whereis [program-name]
Both which and whereis will show absolute path of the binary/program, but unlike which, whereis also shows the program manual page and the program source as well.

Here's some example:
which ls
which firefox
whereis ls
whereis firefox
whereis which




Share this

Previous
Next Post »