whereis Linux Commands

What is Linux whereis Command?

Explanation

whereis COMMAND:

whereis command is used to search and locate source or binary files in the system. This command will return the path where the files are located.

SYNTAX :


whereis [options] files

OPTIONS:


-b Search only for binary file.
-m Locate only for manual sections.
-s Search only for source file.
-u Locate for unusual entries.
-B Change or otherwise limit the places where whereis searches for binary files.
-M Change or otherwise limit the places where whereis searches for manual sections.
-S Change or otherwise limit the places where whereis searches for sources.

EXAMPLE:


  1. whereis thunderbird
    Output:
    thunderbird: /usr/bin/thunderbird
  2. In the above example, the command searches and returns the path where thunderbird is located.

Ask Questions

Ask Question