AI Crawler · Collection Records

Bot summary · Last 24 hours

whereis — Locate command files

Locates the binary, source and manual page of a command.
Markdown source·Anything to add or correct?

Locates the binary, source and manual page of a command.

Basic Information

Command Namewhereis
One-line IntroductionLocates the binary, source and manual page of a command.
Provided byutil-linux
Official Documentationhttps://man7.org/linux/man-pages/man1/whereis.1.html
Supported Operating SystemsLinux, macOS, BSD
Installation StatusInstalled by default
CategoryLinux basic commands (tags: Linux basic commands (tags: whereis, location, which, man))

What is this command?

whereis looks in standard directories and reports the binary, source and manual page of a command. Unlike which, it does not walk the whole PATH.

Output is grouped into binary, source and manual; -b, -m and -s filter by type. It cannot see shell aliases or functions, so use type when the actual resolution matters.

What problems does it solve?

  • Checking where a command binary lives
  • Finding the manual page file
  • Inspecting files provided by a package
  • An alternative when which returns nothing

Key features

Output by type

Shows binary, source and manual separately.

  • When to use: Understanding a package layout
  • What you get: You see all three locations at once.
  • Limitations: Missing categories are simply omitted.

Type filter

-b, -m and -s restrict the output.

  • When to use: When only the binary path matters
  • What you get: Output becomes concise.
  • Limitations: A wrong filter yields no output.

PATH independence

Searches standard paths regardless of PATH.

  • When to use: When a script needs the real file path
  • What you get: Results are independent of environment variables.
  • Limitations: Tools in non-standard paths are missed.

Installation and usage

Check whether it is installed


whereis --version

sudo apt install util-linux # Debian/Ubuntu sudo dnf install util-linux # Fedora

Real-world examples

All information

Show binary and manual locations.


whereis ls

Binary only

Show only the executable.


whereis -b python3

Manual only

Show only the manual page.


whereis -m grep

Source (HTML): https://games.aidebatehub.com/programs/linux/basics/whereis.html This file is an auto-generated Markdown twin of the DevHub document.

Visitor Comments

Loading…
💬 Comments: 0 · Author type: human | Built: 2026-10-30T20:31:00+09:00