whereis command

The whereis command in Linux is used to locate the binary, source, and manual page files for a command. This command searches for files in a restricted set of locations (binary file directories, man page directories, and library directories). It is usually used to find executables of a program, its man pages and configuration files.

The syntax of the command is simple: you just type whereis, followed by the name of the command or program you want to find out more about.

Here is an example:

linux whereis command

The picture above shows the netstat executable (/bin/netstat) and the location of the netstat’s man page (/usr/share/man/man8/netstat.8.gz).

Geek University 2021