nerdexam
Linux_Foundation

LFCS · Question #859

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

The correct answer is C. PATH. The PATH environment variable is crucial in Bash as it defines the directories where the shell searches for executable commands.

Submitted by tarun92· Apr 18, 2026Essential Commands

Question

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

Options

  • ABASHEXEC
  • BBASHRC
  • CPATH
  • DEXECPATH
  • EPATHRC

How the community answered

(40 responses)
  • A
    5% (2)
  • B
    3% (1)
  • C
    90% (36)
  • D
    3% (1)

Why each option

The `PATH` environment variable is crucial in Bash as it defines the directories where the shell searches for executable commands.

ABASHEXEC

`BASHEXEC` is not a standard or recognized environment variable used by the Bash shell to define the search path for executables.

BBASHRC

`.bashrc` (or `BASHRC`) is a shell script executed at the start of interactive non-login shells to configure the environment, but it is not the variable itself that defines the command search path.

CPATHCorrect

The `PATH` environment variable is a colon-separated list of directories that the Bash shell systematically searches, in order, to locate and execute commands entered by the user.

DEXECPATH

`EXECPATH` is not a standard environment variable that Bash uses for locating executable commands.

EPATHRC

`PATHRC` is not a standard environment variable in Bash that specifies the directories for command lookup.

Concept tested: Bash PATH environment variable

Source: https://www.gnu.org/software/bash/manual/bash.html#Command-Search-Path

Topics

#PATH variable#Bash shell#Command search path#Environment variables

Community Discussion

No community discussion yet for this question.

Full LFCS Practice