The whereis command is used to search for executable files, man pages (documentation), and source code in default system paths.
$ whereis -b vi ←Search for the "vi" command in directories vi: /usr/bin/vi $ whereis -l | grep 'bin:' | head ←List directories where executable files are searched bin: /usr/bin bin: /usr/sbin bin: /usr/lib bin: /etc ... |
The whereis command is useful for quickly finding the locations of executable files, man pages, and source code files on your system. It can help you identify where specific commands are located in your system's directory structure.
For more information and examples, you can refer to the provided link.