0Pricing
Linux Command Line & Bash Scripting Mastery · Lesson

Understanding and Customizing the PATH Variable

Master how the shell locates executables through the PATH variable and learn to safely extend and troubleshoot it.

What is PATH?

The PATH environment variable is a colon-separated list of directories the shell searches to find an executable when you type a command.

echo "$PATH"

How the Shell Resolves a Command

When you type ls, the shell scans each directory in PATH left to right and runs the first matching executable it finds.

type ls
which ls

All lessons in this course

  1. Managing Environment Variables (export, unset)
  2. Shell Startup Files (.bashrc, .profile)
  3. Package Management (apt, yum, pacman)
  4. Understanding and Customizing the PATH Variable
← Back to Linux Command Line & Bash Scripting Mastery