How to set environment variables in Windows 11

Information about the operating system’s environment is stored in Environment Variables. Different settings are required for different programs and processes to run. Windows must ensure that all programs and processes on a single computer have access to the Environments they require. Details such as the operating system path, the number of processors used by the operating system, and the location of temporary files are included in this data. In short, Environment Variables are simply Data Storing Mechanisms. Let us learn how environment variables function and how to properly add, change and delete them in this article.

What are Environment Variables?

An environment variable is a dynamically designated value that can influence how computer processes behave. They store the data and are a component of the process environment. The WINDIR environment variable, for example, specifies the location of the Windows Installation Directory. This value of the variable can be used by programs to determine where Windows Operating System files are stored. Some of the most common and significant Environment variables are PATH, HOMEPATH, and USERNAME in Windows. All these variables store values that any system user or process can access at any time.
In the  Windows command prompt, the user can simply type ” echo%Environment Variable name%”, and in Windows Powershell, the user can simply type ” $Env: Environment variable name”, to know and display the variables.

Setting the Environment Variables

 

In order to use and set the environment variables, we need to get permission from the system administrator and have privileges. So, you need to inform the system administrator and seek their help if you are not one. After having these privileges follow the steps below to set the Environment Variables.

Step 1: Simultaneously press ” Windows+R” and type ” sysdm.cpl”.

 

2021 09 24 22h48 08

Step 2: Go to Advanced > Environment Variables.
Environment Variables Min
Step 3: The environment variables panel shows up on the screen. You can observe two types of variables
  1. User Variables:  Use them when you wish to change the environment variables for the current or specific user.
  2. System Variables: Use them when you want the system-wide changes.

 

2021 09 25 00h03 27

 


ADVERTISEMENT

Let us look at an example, to understand how to set Environment variables. You have installed Audacity and want to add its path to the Environment Variables( EVs)

Step 1: Click on New under User Variables to create the EV.

 

2021 09 25 00h07 55

Step 2: New user variable box opens. Type AUDACITY in the variable name.
2021 09 25 00h26 21
Step 3: Now, Click on Browse Directory and select the place where Audacity is installed.
2021 09 25 00h12 14
Step 4: This will populate the path in the variable value. Finally, Click OK.
2021 09 25 00h29 11
Step 5: This will create a new EV called AUDACITY and will be shown as below.
2021 09 25 01h55 57

Changing the Environment Variables

 

Step1: Type “ edit Env ” in the search bar and click on Edit Environment variables for your account.

 

2021 09 25 00h37 53

 

Step 2: Click on Environment Variables.

 

2021 09 25 01h21 27

 

 

Step 3: Select any variable you want to change and click on ” Edit”.

 

2021 09 25 00h33 37

 

Step 4: Edit Environment variable panel opens. Here, you can modify the variable value if you wish and also the name and click on OK.

 

2021 09 25 00h51 32


ADVERTISEMENT


 

Step 5: You can also delete an environment variable by selecting that particular EV and click on ” Delete”.

 

2021 09 25 00h58 58

 


ADVERTISEMENT

Windows PATH Variable

What is Windows PATH Variable?

The PATH variable is simply an address book of your computer’s programs and commands. You must give the address of any new software on your computer that you want to launch from the command-line interface in the PATH variable.
Windows looks for the address for a certain command as part of the process. When you issue a command from the command line, Windows looks for it in the current directory first. If the operating system cannot locate it in the current directory, it looks for the address in the PATH variable.

How to add to the PATH variable?

Follow the steps given below to modify the PATH on Windows

Step 1: Type ” edit Env “ in the search bar and click on Edit Environment variables for your account. 

 

2021 09 25 00h37 53

 

Step 2: Click on Environment Variables.

 

2021 09 25 01h21 27

Step 3: Click on the PATH variable under system variables and click on Edit.
2021 09 25 01h06 06
Step 4: Edit environment variable window opens. Now, Click on New and add the new path you wish to add. Finally, Click on OK.
2021 09 25 01h31 00
NOTE: Along with this, you can also do many more modifications like editing, reordering, or deleting.
Step 5: You may need to RESTART your system so that the changes will be reflected and the system will make sure all apps are running with this PATH change.
Finally, keep in mind that the PATH variable is different for each user in a system. As a result, several users can list different folders without having to change the variable for each one. If you want a tool to be available to all users, you must change the PATH variable in System Variables.
This is all about using Environment Variables in Windows.
Hope this article is informative.
Comment below and let us know your experience.
Thank you.
ADVERTISEMENT