Skip to main content

Windows · System Info

Edit system and user environment variables

Lets advanced users view and edit environment variables such as PATH, TEMP, and custom variables that control how applications, scripts, and the command line locate files and behave.

How to open Environment Variables

  1. Open Settings → System → About
  2. Click 'Advanced system settings' under Related links
  3. Click 'Environment Variables' on the Advanced tab
  4. Select a variable to edit, or click 'New' to add one, under User or System variables

What you should know

  • View and edit user-specific environment variables
  • View and edit system-wide environment variables
  • Edit the PATH variable to add or remove executable search locations
  • Create new custom environment variables for development tools

Editing system environment variables incorrectly, especially PATH, can break command-line tools or installed applications; note the original value before making changes.

Why it matters

Environment variables control how the command line, scripts, and many applications locate executables, temporary storage, and configuration data, making them foundational for developers, IT administrators, and power users running custom tools. A correctly configured PATH variable is often required for command-line tools like Git, Python, or Node.js to work from any terminal window without typing full file paths. Misconfiguring or accidentally deleting entries here is a common source of 'command not recognized' errors after installing new development tools.

Best practices

  • Back up or note the current PATH value before making edits, in case you need to revert
  • Add new entries to PATH rather than replacing the entire value
  • Use user-level variables for personal tools and system-level variables only when all users need access
  • Restart open terminal windows after editing variables, since existing sessions won't see the change

Common problems and fixes

A command-line tool isn't recognized after installing it
Check whether its install location was added to PATH, and add it manually if missing.
PATH variable was accidentally overwritten
Restore from a noted backup of the original value, or reinstall affected tools to have them re-register their PATH entries.
Changes don't apply to already-open command prompts
Close and reopen the terminal or command prompt window, since it only reads variables at launch.

Tips and tricks

  • Use the 'Edit text' option in the variable editor to see and edit PATH as a single string rather than a list, useful for bulk edits
  • Development tool installers often manage PATH entries automatically, so manual edits are usually only needed for custom or portable tools

Frequently asked questions

What's the difference between user and system variables?

User variables apply only to the currently signed-in account, while system variables apply to all users on the device.

Do I need administrator rights to edit these?

Editing system-level variables requires administrator rights; user-level variables don't.

Can editing this break Windows?

Incorrect edits, especially to PATH, can break command-line tools and some applications, though core Windows functionality is generally unaffected.

More System Info guides for Windows

See every Windows guide