Learn to find program binaries and manuals at the Linux command line.
Linux whereis command summary with examples (3:57)
Videos can also be accessed from the YouTube Playlist.
Our fourteenth word, or command to memorize is
whereis from the category Help.
whereis allows you to locate
binaries, manuals and source code.
Recall from our last video (tutorial) we talked about gaining our
whereis will help us
answer the where
question: where are the important files associated with a command?
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
whereis command has
10 options and the most common argument is the
command in question.
We'll cover the options
-b for binaries, and
-m for manuals, but skip
-s for downloaded source code
So why is
whereis an important command?
whereis helps us find relevant
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go, type
First, binaries here. See how logical the short abbreviations are? bin for binaries. Next are manual files, and if the source code isn't available, it'll be ignored (as is the case here).
That's a tidy list of options, lowercase
-m are most common. Notice the
-h option is missing (even though we
just used it).
If this inconsistency bothers you, don't despair. Recall Linux is free and is the work of many contributors. Yes, it's quirky, but just be patient with it.
And let's find the binaries for a few commands we've explored. Try
whereis -s man less type.
Oh yeah, type is a shell builtin (so help is found in the
bash command manual).
Last, let's search for manuals for
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
If you're curious about Linux search paths, check out the
-l option. Now that we've seen
whereis, do you wonder what's next?
Okay, thanks for visiting today. I hope this was a fun introduction
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
Learn faster by combining text with video. Subscribe here.
whoamicommand, hit Back.
datecommand, click Next.