Introduction
This tutorial introduces the whereis
command in Linux, a utility designed to locate the binary, source, and manual page files for a specified command.
This tutorial introduces the whereis
command in Linux, a utility designed to locate the binary, source, and manual page files for a specified command.
The whereis
command is useful for finding essential files associated with a command, including its binary executable, source code, and manual page.
Let's begin by understanding the basic usage of the whereis
command. The whereis
command is used to locate the binary, source, and manual page files for a specified command.
Input:
whereis ls
Output:
ls: /bin/ls /usr/share/man/man1/ls.1.gz
In this example, the whereis
command displays the paths to the binary executable and manual page for the ls
command.
The whereis
command provides a simple way to find important files related to a command.
whereis [options] file
-b
: Target executables.-m
: Locate help file.The -b
option locates the binary executable files of a specified command.
Input:
whereis -b ls
Output:
ls: /usr/bin/ls
The -m
option finds the manual page files of a specified command.
Input:
whereis -m ls
Output:
ls: /usr/share/man/man1/ls.1.gz
The whereis
command is a versatile tool for locating essential files associated with a command, including its binary executable, source code, and manual page. It provides valuable information for users and administrators when working with various commands in the Linux environment.