The correct command to locate programs and their corresponding man pages and configuration files is whereis. The whereis command searches for the binary, source, and manual files for a given command name in a list of standard Linux directories. It can also accept a list of directories to search in by using the -B, - M, or -S options. The whereis command is useful for finding the location and documentation of a program. The other commands are not suitable for this task. The dirname command strips the last component from a file name and returns the directory name. The which command shows the full path of a command that is in the $PATH variable. The basename command strips the directory and suffix from a file name and returns the base name. The query command is not a standard Linux command. References: * [LPI Linux Essentials - 1.1 The Linux Community and a Career in Open Source] * [LPI Linux Essentials - 1.2 Finding Your Way on a Linux System] * [LPI Linux Essentials - 1.4 Finding Files] * whereis command in Linux with Examples - GeeksforGeeks * Whereis Command in Linux | Linuxize * Linux whereis Command Explained for Beginners (5 Examples) - HowtoForge * whereis command | Linux# - Geek University * whereis command in Linux - LinuxForDevices