whereis(1)

whereis1

Locate programs

Usage

whereis [-a] name ...

Overview

The whereis utility checks the standard binary directories for the specified name, printing out the paths of any it finds that are executable by the user.

The path searched is:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin

If the -a flag is given, whereis will return a list of all matches instead of just the first match.

Exit status

The whereis utility exits with one of the following values:

0

All names were successfully resolved.

1

Some names were resolved but not all.

2

No names were resolved.

Releases

61 releases since OpenBSD 2.1; the text changed 10 times.

  1. 2.1–2.3
  2. 2.4
  3. 2.5
  4. 2.6
  5. 2.7–3.3
  6. 3.4–4.1
  7. 4.2–4.8
  8. 4.9–5.0
  9. 5.1–5.3
  10. 5.4–6.5
  11. 6.6–8.0

-1 until OpenBSD 4.8.

History

The whereis command first appeared in 2BSD, but the original version was legally tainted and was not included as part of the 4.4BSD release, such that most of the original functionality was lost.

The -a option first appeared in OpenBSD 2.3.

Authors

The original version was written by Bill Joy.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.