Batch Path Variable - chrisbitm/python GitHub Wiki

The PATH is an important system environment variable in operating systems. It specifies a list of directories where the system looks for executable files when you run a command in the terminal or command prompt.

When you type a command, such as notepad, the Operating System checks the Directories listed in the PATH variable to find the Executable (exe) File. This means you can run programs without needing to type their full directory path every time.

On Windows, the PATH variable might include directories like:

C:\Windows\System32;C:\Program Files\Java\bin;C:\Python\Scripts;
  • If you run Java or Python in the Command Prompt, the system will search each directory in PATH for the java.exe or 'Python.exe" file and execute it.
  • Every Directory is delimited by a Semi-colon ; All one line if you view the PATH Variable from the Shell

Modifying the PATH

Why Modify it?

If you install new software and want to run it from the Shell, you may need to add its installation directory to the PATH. Some Program Installers, such as Python, give you the option to do it automatically.

How to Edit It?

On Windows, you can modify the PATH variable through the System Properties (Environment Variables) settings. On Linux/macOS, you can edit configuration files like .bashrc or .zshrc.