Your Guide to How To Add Directory To Path
What You Get:
Free Guide
Free, helpful information about Computers & Operating Systems and related How To Add Directory To Path topics.
Helpful Information
Get clear and easy-to-understand details about How To Add Directory To Path topics and resources.
Personalized Offers
Answer a few optional questions to receive offers or information related to Computers & Operating Systems. The survey is optional and not required to access your free guide.
How to Add a Directory to Your PATH (Windows, macOS, and Linux)
When you type a command into a terminal — python, git, ffmpeg — your operating system doesn't search your entire hard drive to find it. It checks a specific list of folders called the PATH environment variable. If the program lives in a folder that isn't on that list, the OS returns a "command not found" error even if the software is perfectly installed.
Adding a directory to PATH tells the OS: "Also look here when someone runs a command." It's one of the most common configuration tasks in computing, and the exact method depends heavily on your operating system, your shell, and whether you want the change to be permanent or temporary.
What the PATH Variable Actually Is
PATH is an environment variable — a named value stored in your system's environment that programs and shells can read. It contains a list of directory paths separated by a delimiter (a colon : on macOS/Linux, a semicolon ; on Windows).
When you run a command, the shell walks through each directory in PATH from left to right and looks for a matching executable. The first match wins, which is why order sometimes matters — two versions of Python in two different folders can produce very different behavior depending on which directory appears first in PATH.
Adding a Directory to PATH on Windows
Temporary (current session only)
Open Command Prompt and run:
Or in PowerShell: