Set via GUI

  1. Search “environment variables” → “Edit the system environment variables”
  2. “Environment Variables” → select “Path” → “Edit” → “New”
  3. 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.

  • Fiverr - Find freelance developers and tech experts