Linux whereis Guide - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
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
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
- which Guide - Find commands in PATH
- locate Guide - Find files by name
- find Guide - Advanced searching
- whereis Documentation:
man whereis
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.