exam questions

Exam LFCS All Questions

View all questions & answers for the LFCS exam

Exam LFCS topic 1 question 83 discussion

Actual exam question from Linux Foundation's LFCS
Question #: 83
Topic #: 1
[All LFCS Questions]

Which variable defines the directories in which a Bash shell searches for executable commands?

  • A. BASHEXEC
  • B. BASHRC
  • C. PATH
  • D. EXECPATH
  • E. PATHRC
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Strib
6 months, 3 weeks ago
Selected Answer: C
The correct answer is C. The directories in which a Bash shell searches for executable commands are defined by the PATH variable. PATH is an environment variable that contains a colon-separated list of directories. When a command is entered in the shell, it looks for the command in each directory listed in PATH, in the order specified, until it finds the executable file. If the command is not found in any of the directories listed in PATH, the shell will display a "command not found" error.
upvoted 1 times
Strib
6 months, 3 weeks ago
A. BASHEXEC: This is not a standard environment variable in Bash. It does not define the directories for searching executable commands. B. BASHRC: This variable represents the filename of the Bash configuration file that is sourced when a new interactive shell is started. It does not define the directories for searching executable commands. D. EXECPATH: This is not a standard environment variable in Bash. It does not define the directories for searching executable commands. E. PATHRC: This is not a standard environment variable in Bash. It does not define the directories for searching executable commands. In summary, only option C, PATH, defines the directories in which a Bash shell searches for executable commands.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago