Search

whereis

Locate the binary, source, and man page files for a command.

Synopsis

syntax
whereis [OPTION]... NAME...

Examples

Find binary, source, and man page for gcc
whereis gcc
Find only python binaries
whereis -b python
Find man page locations for ls
whereis -m ls

Common options

FlagDescription
-bSearch only for binaries
-mSearch only for man pages
-sSearch only for source files

About whereis

The `whereis` command locate the binary, source, and man page files for a command. Search commands help you locate files, text patterns, and executables across the filesystem.

Efficient searching is critical when working with large codebases or troubleshooting system issues. These tools range from simple filename lookups to full regular-expression pattern matching across file contents.

The command accepts 3 commonly used flags shown above, though the full set of options is available in the man page (`man whereis`). The 3 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Search Commands

Other commands in the Search category

Related tools