nerdexam
LPI

117-101 · Question #229

Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?

The correct answer is E. whereis. See the full explanation below for the reasoning.

Question

Which of the following commands can be used to locate programs and their corresponding man pages and configuration files?

Options

  • Alocate
  • Bwhich
  • Cfind
  • Dquery
  • Ewhereis

How the community answered

(52 responses)
  • A
    8% (4)
  • B
    2% (1)
  • C
    13% (7)
  • D
    4% (2)
  • E
    73% (38)

Community Discussion

6
Toby R.Toby R.Mar 18, 2026

whereis is the one you want here, option E. The whole point of whereis is that it searches for a binary, its man page, and its source or config files all in one shot, which is exactly what the question is describing. The other options are close but wrong for this specific use case: which only finds the executable in your PATH, locate just does a filename database search, and find crawls the filesystem based on criteria you give it. None of those touch man pages or config files the way whereis does.

10
Thiago A.Thiago A.Mar 21, 2026

whereis is the right call. It searches standard binary, source, and manual page directories all in one shot, so "whereis ssh" gives you /usr/bin/ssh, /usr/share/man/man1/ssh.1.gz, and any source path without you having to run multiple commands.

4
Marit C.Marit C.Apr 10, 2026

whereis is the one built for exactly this, it searches standard binary, man, and source locations in one shot rather than just walking PATH or hitting a full filesystem index. Quick check though, do you know what the three fields in a typical whereis output actually correspond to, and why locate would fall short here even if it technically finds files by name?

4
Samuel O.Samuel O.Mar 13, 2026

Spent years in facilities management before moving into IT, and this one tripped me up early on because I kept reaching for "which" out of habit since it was the first lookup command someone showed me on the job. The thing is, "which" only tells you where the executable lives in your PATH, nothing about the man page or any config files tied to that program. "locate" is fast but it just searches a filename database and has no awareness of what role a file plays, so it will hand you everything and nothing at the same time. The command that was actually built to surface the binary, the source, and the manual page together is the one that has "where" right in the name, which should help you remember what it is for. Here is my genuine question though: in your actual test environment or lab, have you tried running that command against something like "passwd" or "ssh" and looked at the full output it returns? I ask because understanding what the three output fields represent, the binary path, the source path, and the man page path, is what makes this stick for the exam versus just memorizing a letter.

2
Fatima Z.Fatima Z.Mar 16, 2026

Great point on the three-field output, and here is the hook I give my study group: BSM stands for Binary, Source, Manual, so just picture "Be Sure to Memorize" every time you type whereis, and you will never blank on what those three columns mean under exam pressure.

0
Fatima Z.Fatima Z.Mar 29, 2026

Think W-M-C, "Where's My Config" and you are basically spelling out what whereis does in one shot, it hunts down the binary, the man page, and the config file all at once. But here is what I always ask folks to really lock in the difference: if you ran "which" instead, would it find you the man page location too, or just stop at the executable path?

2
Full 117-101 Practice