nerdexam
Linux_Foundation

LFCS · Question #697

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. The whereis command is used to locate the binary, source, and manual page files associated with a given command.

Submitted by kim_seoul· Apr 18, 2026Essential Commands

Question

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

Options

  • Adirname
  • Bwhich
  • Cbasename
  • Dquery
  • Ewhereis

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    6% (2)
  • D
    3% (1)
  • E
    88% (30)

Why each option

The `whereis` command is used to locate the binary, source, and manual page files associated with a given command.

Adirname

`dirname` is a command that outputs the directory component of a path, not for locating programs or their associated files.

Bwhich

`which` locates only the executable binary of a command within the user's PATH environment variable, but it does not find man pages or configuration files.

Cbasename

`basename` outputs the non-directory (file name) component of a path, serving an opposite function to `dirname`.

Dquery

`query` is not a standard general-purpose Linux command for locating programs and their associated files; it might refer to package manager query functions (e.g., `rpm -q`), which have a different scope.

EwhereisCorrect

The `whereis` command is specifically designed to locate the executable binary, source code, and manual page files for a specified command by searching standard system directories. This makes it ideal for finding all related components of a program.

Concept tested: Locating program components

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

Topics

#whereis command#file location#command utilities

Community Discussion

No community discussion yet for this question.

Full LFCS Practice