- How to locate the binary, source and/or man page files for a command?
- $ whereis command
‘whereis’ has some options you can specify in order to limit the places to look at, or the type of files (binary, source, man page file, …etc).
The ‘whereis’ command returns all the places where the command can be found, looking into typical Unix locations. But, more frequently, you are just interested in finding where the commands you type on the command line are located on the filesystem, according to the $PATH variable.
- How to show the path of a command?
- $ which command
Without parameter, it stops on the first command found in the path. If you want to list all the locations of the command in the path, you can call it with the -a option.
I encourage you to browse the man pages if you want a detailed description of these commands.