Quickly find where executables, source files and man pages live on a Linux system. 30.05.2026 | reading time: 2 min Need to know where a program lives, where its source might be, or where the man page sits? The `whereis` command finds binaries, source files and manual pages fast by searching a set of system directories; it is a quick first step when troubleshooting or writing scripts. See it in action Run this on any Linux box to inspect results: ``` $ whereis ls ls: /bin/ls /usr/share/man/man1/ls.1.gz ``` The first path is the executable, the second points to the compressed man page; you now have concrete locations to inspect or call from a script. Handy options to control searches Use `-b` to restrict output to binaries, `-m` for man pages and `-s` for sources; specify alternate search lists with `-B`, `-M` and `-S` and use `-u` to highlight unusual matches, which makes `whereis` useful in scripts and automated checks when you need targeted results quickly. When whereis is not enough Remember that `whereis` searches a limited set of standard directories and man paths and does not consult the locate database; use `which` or `type` to see which executable the shell will run, `locate` or `find` for full filesystem searches, and prefer `whereis` when you want a compact inventory of binary, source and man locations. Clear next steps Try `whereis` together with `which` and `locate` on a few utilities to learn their differences; mastering these quick lookup tools speeds troubleshooting and improves scripting reliability, and if you want structured learning consider exam preparation like CompTIA Linux+ or LPIC-1 with intensive courses at bitsandbytes.academy to deepen your skills. Join Bits & Bytes Academy First class LINUX exam preparation. utilities filesystem troubleshooting