Skip to content

Linux whereis Guide

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux whereis Guide

Complete beginner-friendly guide to whereis on Linux, covering Arch Linux, CachyOS, and other distributions including finding binaries, source files, and manual pages.


Table of Contents

  1. Understanding whereis
  2. whereis Basics
  3. Finding Files
  4. File Types
  5. Troubleshooting

Understanding whereis

What is whereis?

whereis locates binaries, sources, and manuals.

Uses:

  • Find binaries: Locate executables
  • Find sources: Locate source files
  • Find manuals: Locate man pages
  • Complete info: Get all file types

Why it matters:

  • File location: Find all related files
  • Documentation: Locate man pages
  • Sources: Find source files

whereis Basics

Find Command

Basic usage:

# Find command files
whereis ls

# Shows:
# ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz

Multiple Commands

Find several:

# Find multiple
whereis ls cat grep

# Files for each

Finding Files

Specific Types

Find binaries:

# Binaries only
whereis -b ls

# -b = binaries

Manual Pages

Find manuals:

# Manual pages only
whereis -m ls

# -m = manuals

File Types

All Types

Complete info:

# All file types
whereis -a ls

# -a = all (shows all matches)

Sources

Find sources:

# Source files
whereis -s ls

# -s = sources

Troubleshooting

whereis Not Found

Check installation:

# Check whereis
which whereis

# Usually in util-linux
# Install if missing
sudo pacman -S util-linux

Summary

This guide covered whereis usage, file location, and file type finding for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally