where
Locate command binaries in standard locations
TLDR
Find all instances of a command
SYNOPSIS
where [options] command ...
PARAMETERS
-b
Search only for binaries.
-m
Search only for manual pages.
-s
Search only for sources.
-u
Check whether the programs are stripped of debugging information.
DESCRIPTION
The where command locates the binary, source, and manual page files for specified commands. It searches a standard set of directories and those specified in the user's $PATH environment variable.
Unlike the which command, where displays all matching locations, not just the first one found in the path.
It's important to note that where relies on a pre-built database of file locations, which might not always be up-to-date. This can lead to inaccurate results, especially after recent software installations or updates. Using other commands like 'which' or 'type -a' are recommended for more reliable results.
CAVEATS
The where command's database might be outdated, leading to incorrect results. Consider using which or type -a for more up-to-date and reliable command location.
RETURN CODES
The where command returns 0 if all commands are found, and a non-zero value if any command is not found.
PATH VARIABLE
The where command relies on the $PATH environment variable to determine the directories to search. Make sure your $PATH is correctly configured to get accurate results.
HISTORY
The where command has been part of various Unix-like operating systems for a long time, primarily serving as a quick way to identify the location of executable commands. Its usage has somewhat diminished as more sophisticated alternatives like which and type have become more prevalent, often offering more accurate or real-time results. It is considered obsolescent in POSIX standard, removed from the standard in 2001. whereis is the tool to find binary/source/manual.