Technology

#How to Edit Environment Variables on Windows 10 or 11

“How to Edit Environment Variables on Windows 10 or 11”

Windows 10 and 11 logos

Editing your PC’s environment variables can save you time in Command Prompt and make your scripts more concise. It also lets you customize where Windows stores certain files. Find out how to edit them here.

How Environment Variables Work

Environment variables can be used to point to or set important directories, like the location of the Windows Temp folder, or they can they relay important information about your PC, like the version of Windows it is running or the number of processor cores it has available. Environment variables be read by any program or script that runs on your computer. Environment variables can be defined for individual user accounts, or on a system-wide basis.

One environment variable of note is the Path variable. Path defines what folders are checked for executables when a command is run in a terminal or a script. Take Notepad as an example — you can type notepad into Command Prompt and it will launch immediately. If you type chrome, however, you’ll get an error message. The error occurs because the Notepad executable is in a folder defined in the Path, but the Chrome executable is not.

Chrome is not on PATH, and cannot be run without specifying a folder.

By default, Path only points to a few Windows folders, but you can easily add more.

Warning: Changing environment variables can result in your PC malfunctioning. If you’re going to add, edit, or delete an environment variable, be sure to double-check what it is you’re doing.

How to Edit Environment Variables

There are some minor differences between the user interfaces of Windows 10 and Windows 11, but the basic process of editing environment variables is the same.

To configure your environment variables, click the Start button, then type “environment properties” into the search bar and hit Enter. In the System Properties window, click “Environment Variables.”

Click "Environmental Variables."

Click on the variable you’d like to change, click “Edit.”

Click "Edit."

Many environment variables will simply take a name and value, like “Number of processors.” All you have to do to edit them is to change the value, and click “OK.”

Change number of processors environmental variables, then click "OK."

Adding an environment variable works the exact same way, except you must specify the variable name and value. The variable value can take multiple values if you want, but the values must be separated by semicolons. Once you’ve named your variable and assigned a value, click “OK.”

Fill out the variable name, the variable value(s), and then click "OK."

Some environment variables, like Path, look a little different, though they function in exactly the same way. The Path variable is given as a list from which you can add, edit, or delete entries.

Edit Paths, pointing to options "New," "Edit," and "Delete."

You can add another folder to the Path by clicking “New,” and then specifying the folder.

Click "New," fill out the folder in the text box, and then click "OK."

RELATED: How to Move Windows’ Temporary Folders to Another Drive

If you write a lot of batch or PowerShell scripts, or frequently use non-Windows command-line applications, it is probably worth the effort to customize your environment variables — you’ll save a ton of time in the long run.

If you liked the article, do not forget to share it with your friends. Follow us on Google News too, click on the star and choose us from your favorites.

For forums sites go to Forum.BuradaBiliyorum.Com

If you want to read more like this article, you can visit our Technology category.

Source

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close

Please allow ads on our site

Please consider supporting us by disabling your ad blocker!