Now Reading
How to Edit Environment Variables in Windows 10 or 11.
[vc_row thb_full_width=”true” thb_row_padding=”true” thb_column_padding=”true” css=”.vc_custom_1608290870297{background-color: #ffffff !important;}”][vc_column][vc_row_inner][vc_column_inner][vc_empty_space height=”20px”][thb_postcarousel style=”style3″ navigation=”true” infinite=”” source=”size:6|post_type:post”][vc_empty_space height=”20px”][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row]

How to Edit Environment Variables in 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 allows you to change the location of files stored by Windows. You can learn how to edit them.

How Environment Variables work

Environment variables can be used for pointing to or setting important directories such as the Windows Temp folder. They can also relay important information about your computer, such as the version of Windows it’s running and the number of processor cores available. Any program or script running on your computer can access the environment variables. You can create environment variables for individual user accounts or for the entire system.

One environment variable worth noting is the Path variable. Path is a variable that specifies which folders are checked for executables whenever a command is executed in a terminal or script. Take Notepad as an example — you can type NotepadYou can launch it immediately by entering Command Prompt You can also type chrome, however, you’ll get an error message. The error occurs when the Notepad executable is located in a Path folder, but the Chrome executable not.

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

Path defaults to only a few Windows folders. However, you can easily add more.

Warning:Your PC may malfunction if you modify environment variables. 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

While there are minor differences in the user interfaces for Windows 10 and Windows 11, the basic process of editing the environment variables is the exact 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

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

Click

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

The process of adding an environment variable is the same, except that you must specify its name and value. You can have multiple values for the variable value, but you must separate them 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

Some environment variables, such Path, can look a bit different, but they work exactly the exact same way. The Path variable can be used to add, edit, delete entries.

Edit Paths, pointing to options

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

Click

RELATED: How to Move Windows’ Temporary Files 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.

View Comments (0)

Leave a Reply

Your email address will not be published.