How to find an executable

From Wiki
Jump to navigation Jump to search

whereis

whereis <executablename>

whereis searches through some standard locations for the name given

which

which <executablename>

will start at the beginning of your path and search each entry for the file name. It will then return the first file that matches. While whereis may return multiple locations, which will only return one - the file that is executed if you don't specifiy a full path.

if both of those fail, you can always try

find

find /usr -name <executablename> -print

which will search every directory in the /usr subtree for the file. It's slow.