The
whereis utility checks the standard binary directories for the specified programs, printing out the paths of any it finds.
The default path searched is the string returned by the
sysctl(8) utility for the “user.cs_path” string. If the [
-p] option is specified, then the value of the environment variable
PATH is used instead.