Linux Commands - whereis command
by
Jeremy Canfield |
Updated: December 26 2022
| Linux Commands articles
There are a few commands that can be used to find files on a Linux system.
- find command
- locate command
- whereis command (this article)
- which command
The whereis command is used to find the location of source/binary file and manuals for a file. For example, to list the files and manuals for Python.
~]$ whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python2.7-config /usr/bin/python3.7 /usr/bin/python3.7m /usr/lib/python2.7 /usr/lib/python3.7 /usr/lib64/python2.7 /usr/lib64/python3.7 /etc/python /usr/include/python2.7 /usr/include/python3.7m /usr/share/man/man1/python.1.gz
Or for Perl.
~]$ whereis perl
perl: /usr/bin/perl /usr/share/man/man1/perl.1.gz
Or any of the command Linux commands, such as tar.
~]$ whereis tar
tar: /usr/bin/tar /usr/share/man/man1/tar.1.gz /usr/share/info/tar.info-1.gz /usr/share/info/tar.info-2.gz /usr/share/info/tar.info.gz
Did you find this article helpful?
If so, consider buying me a coffee over at