Skip to content
Commitpedia
Log in Join & edit

What is PATH?

PATH is the list of folders your shell searches to find a program when you type its name.

Drafted with AI from official documentation. Scripts were run in a test environment and repository links verified. Awaiting a human check. Did it work for you? Last edited Outdated?

Edit history of What is PATH?: 1 recorded edit
Edit history · 1 edit
Type
Article
Edits
1
Editors
1
First issued
15 Oct 2026
Last edit
15 Oct 2026
Reading
1 min

PATH is an environment variable holding a list of directories separated by colons (semicolons on Windows). When you type python, the shell walks through those folders in order and runs the first file called python it finds. It is a list of places to look, like checking the kitchen drawer, then the garage, then the shed for the scissors.

The classic error command not found usually means the program is installed somewhere not on your PATH. Installers for Node, Go, Rust and Homebrew add lines to your shell config to extend it. Order matters: a folder earlier in the list wins, which is how a virtual environment makes its own python take priority.

echo $PATH
which python3
export PATH="$HOME/.local/bin:$PATH"

See also: What is an environment variable? and What is a shell?

Did this work for you?

No votes yet. Be the first.

If it did not work, the report form below tells the editors what went wrong.

See also

  • 0049 Pipes and redirection: connecting commands A pipe sends one command's output into another command, and redirection sends output to a file. Together they let small tools build… Beginner · Explains an idea · Linux, macOS Article Basics · Text processing 15 Oct 2026
  • 0050 File permissions: chmod, chown and what 755 means Every file has an owner, a group and read/write/execute permissions for three kinds of users. chmod changes the permissions and chown changes… Beginner · Explains an idea · Linux, macOS Article Basics 15 Oct 2026
  • 0051 Environment variables and PATH Environment variables are named settings that every program inherits from the shell. PATH is the one that tells the shell where to… Beginner · Explains an idea · Linux, macOS Article Basics 15 Oct 2026
  • 0057 Shell cheat sheet: everyday commands A quick reference for moving around, managing files, viewing and searching text, checking processes and disk space in bash and zsh, with… Beginner · Cheat sheet · Linux, macOS Article Basics · Command-line tools 15 Oct 2026
  • 0284 What is a shell? A shell is the program that reads the commands you type and tells the operating system to run them. Beginner · Explains an idea · Any system Article Basics 15 Oct 2026
  • 0285 What is a terminal? A terminal is the window where you type commands; the shell inside it does the actual work. Beginner · Explains an idea · Any system Article Basics 15 Oct 2026

History

Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.

  1. Dominik +795 chars

Report a problem

Something wrong, unsafe or copied? Tell the editors.
What is wrong?