Locating Commands
The whereis and apropos utilities help you find a command whose name you have forgotten or whose location you do not know. When there are multiple copies of a utility/program, which can tell you which copy you will run. GNU made a utility named locate more secure and renamed it slocate. This utility builds a compressed database that speeds up searches. Refer to the slocate man page.
tip || which versus whereis
Give it the name of a program you want to run, and which looks through the directories in your search path, in order, and locates the program. If more than one program with the name you specify is in your search path, which displays the name of only the first one (the one you will execute).
The whereis utility looks through ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access