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
- Open Settings → System → About
- Click 'Advanced system settings' under Related links
- Click 'Environment Variables' on the Advanced tab
- 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.
Related settings
- About / System InformationAbout shows your PC's core specifications at a glance — processor, installed RAM, device ID, and system type — alongside your exact Windows edition, version, and build number. It's the single quickest place to find the information support technicians, driver downloads, and compatibility checks almost always ask for first.
- Advanced System SettingsAdvanced System Settings (opened via sysdm.cpl or 'Advanced system settings' in search) is a legacy System Properties dialog covering performance options like visual effects and virtual memory, system startup and recovery behavior, user profile management, and manual environment variable editing. These controls predate the modern Settings app and remain the only place for several deeper configuration options.
More System Info guides for Windows
- Date & TimeDate & Time settings control your system clock, time zone, and whether Windows sets these automatically using your location and an internet time server. Correct time settings matter well beyond the clock display — they affect file timestamps, certificate validation, scheduled tasks, and login to network resources.
- ActivationActivation shows whether your copy of Windows is genuinely licensed and linked to your hardware or Microsoft account, which edition you're running, and lets you enter a new product key or upgrade to a different edition, like from Home to Pro. A properly activated Windows unlocks full personalization options and removes the persistent activation watermark.
- Rename This PCLets you change the device name Windows uses to identify this PC on networks, in file sharing, and when pairing devices like Bluetooth accessories.
- System Protection & Restore PointsConfigures System Restore, which periodically saves snapshots of system files and settings so you can roll the PC back to an earlier working state after a problematic driver or software installation.
- Domain or Workgroup SettingsLets you configure whether this PC belongs to a home network workgroup or a business network domain, which affects sign-in options, network resource access, and group policy management.
- User Account Control SettingsControls how often Windows prompts for confirmation before allowing apps or processes to make changes that require administrator privileges, balancing security against interruption frequency.