Skip to main content
Guides Menu

Windows PATH Variable Explained

What the Windows PATH variable does, how to view and edit it on Windows 10 & 11, and the most common mistakes that cause 'command not found' errors.

Vishal Hulawale
April 2026·12 min read

Everything you need to know about the PATH environment variable on Windows — what it does, how to edit it, and why developer tools like Java, Node.js, and Python depend on it.

What Is the PATH Variable?

The PATH is a system environment variable that tells Windows where to look for executable programs. When you type a command like java --version in a terminal, Windows searches through every directory listed in PATH until it finds a matching file.

'java' is not recognized as an internal or external command...

How to Edit PATH (Windows 11)

  1. Search for "Environment Variables" in the Start menu.
  2. Click "Edit the system environment variables".
  3. Click "Environment Variables…" at the bottom.
  4. Select Path under System Variables and click Edit.
  5. Add your new directory path and click OK.

Common Mistakes

  • Adding the file, not the folder:Always add the \bin directory, not the .exe file itself.
  • Not restarting the terminal:Changes only apply to new terminal windows.

Related Guides