Set via GUI
- Search “environment variables” → “Edit the system environment variables”
- “Environment Variables” → select “Path” → “Edit” → “New”
- Click OK → restart your terminal
Check via Command Line
$env:PATH -split ";" # PowerShell
echo %PATH% # Command Prompt
Set Temporarily
$env:MY_KEY = "my_value" # PowerShell (session only)
set MY_KEY=my_value # Command Prompt (session only)
Common Pitfalls
- Changes don’t apply until the terminal is restarted
- User environment variables only affect the current user account
If npm still doesn’t work after fixing the PATH, see npm Command Not Working on Windows.
Related Posts
- npm Command Not Working on Windows
- How to Install Git on Windows and Configure It
- Install WSL2 on Windows
- Set Up Windows Terminal
Recommended Services
- Fiverr - Find freelance developers and tech experts