Editing PATH in Windows
Environment variables such as PATH help organize computers to make important apps and files easier to access. You can edit PATH using a GUI or with PowerShell.
temporary change with PowerShell
$env:Pathgets the current contents of the PATH variable.$env:Path += ';C:\my\file\path'appends a file or folder to PATH.$env:Path = 'C:\my\file\path;' + $env:Pathprepends a file or folder to PATH.
Changes to PATH made this way will only last until you close the terminal.
permanent change with a GUI
- Press the Windows key.
- Type
pathand select “edit the system environment variables”. - In the window that pops up, go to the Advanced tab.
- Click
Environment Variables. - In the user variables (the top box; see below), select the row that has “Path” in the left column.

- Click
Edit. - Click
New. - Click
Browse. - Select the file or folder you want to add to PATH.
- Click
OKon each of the new windows. - Restart any running terminal for the change to take effect.