LPIC-1 Exam 101 v5 (Linux Administrator) — Question 4
Which of the following commands displays the path to the executable file that would be executed when the command foo is invoked?
Answer options
- A. lsattr foo
- B. apropos foo
- C. locate foo
- D. whatis foo
- E. which foo
Correct answer: E
Explanation
The correct answer is 'which foo' because this command specifically shows the path of the executable that will be executed for the command. The other options do not provide this information: 'lsattr' lists attributes of files, 'apropos' searches for commands related to a keyword, 'locate' finds files by name, and 'whatis' provides a brief description of a command.