thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Systems & Data Center · Foundational

PATH Variable

The environment variable listing directories the shell searches, in order, for executable commands.

Definition

PATH is a colon-separated list; the first match wins. Commands outside PATH must be run with a full or relative path, such as ./script.sh. which and type show which executable will run.

Example

export PATH=$PATH:/opt/tools/bin adds a directory to the search path.

Exam tip

The current directory is not in PATH by default, so run local scripts as ./script.sh.

Related terms