nerdexam
LPI

010-150 · Question #85

When you are looking for brief information about a program in your PATH with its associated man pages, you would use ...

The correct answer is B. whereis. The whereis command locates the binary, source, and manual page files for a given command, making it the right tool when you need both the executable location and man page references.

Finding Your Way on a Linux System

Question

When you are looking for brief information about a program in your PATH with its associated man pages, you would use ...

Options

  • Awhich
  • Bwhereis
  • Clocate
  • Dwhere

How the community answered

(31 responses)
  • A
    6% (2)
  • B
    81% (25)
  • C
    3% (1)
  • D
    10% (3)

Why each option

The whereis command locates the binary, source, and manual page files for a given command, making it the right tool when you need both the executable location and man page references.

Awhich

which only outputs the full path of the executable that would be run, and provides no information about man pages.

BwhereisCorrect

whereis searches standard binary, source, and manual page directories and returns all associated paths for a given program name, including man page locations. Unlike which, it is not limited to the executable alone. This makes it the correct choice when the goal is to find brief program info alongside its documentation.

Clocate

locate searches a prebuilt file index for any file matching a pattern and is not specific to programs in PATH or their man pages.

Dwhere

where is not a standard Linux command; it exists in some shells like csh/tcsh as a built-in but does not report man page locations.

Concept tested: Linux command lookup tools - whereis vs which

Source: https://man7.org/linux/man-pages/man1/whereis.1.html

Topics

#whereis command#man pages#PATH search#command location

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice