
Sometimes you might need to clear the environment variable on your Windows. But how can you do this? Keep reading to find out all the methods you can use to remove and change environment variables.
So in this article, we have seen all about how to set, edit, and delete environment variables in windows 11. Here I have more than one method to set, delete and edit windows environment variables as per your choice.
In this article, we are going to see how to set, edit and delete environment variables in Windows 11 operating system along with step by step guide with the help of appropriate screenshots. Different-2 programs require different environment variable settings to be executed. The environment is mainly used to store the information about the system environment running in the current machine.
Headings of Contents
Windows uses environment variables to store information about a system, such as its processes and resource usage. Setting these variables means creating shortcuts that allow you to find data locations using a keyword instead of typing in the whole location path. If you want to avoid manually remembering and entering file locations, we’ve got you covered. In this tutorial, we will look at how to create environment variables.

Windows 10 supports a number of legacy features from older versions of the operating system. One of those legacy features is the environment variable. Environment variables offer a useful way to control the way Windows operates with an extremely small footprint in terms of memory usage.
Setting environment variables is very useful and, fortunately, very simple. In this article, we’ll go over how to find and set your environment variables in Windows 10.
Changing Environment Variables
You can edit your environment variables to make them easier to use and access. Here’s how to change these variables in Windows.
Set Windows PATH Variable
The PATH variable is a list of the programs and commands stored on your computer. You must enter the program’s address or command that you want to launch to open it. When you run a command, Windows checks for the address of the program or command in the current directory. If it can’t find it, it looks for it in the PATH variable. Check out how to set a PATH variable.
Setting Environment Variable using Windows Powershell
Here I’m gonna show you can set, edit and delete the environment variable using Windows PowerShell.
In the above syntax, variable-name represents the name of the variable which you want to keep, and the value represents the value of a variable.
So here I am going to set a variable name website along with the value “Programming Funda“.

How to Set Environment Variables in Windows 11?




So finally we have seen the whole process to set new environment variables in the windows 11 machine.
What is Environment Variable in Windows?
These are some common environment variables available in the windows operating system.
There are other environment variables available except all of the above.
Deleting Environment Variable using Windows Powershell
To delete the environment variable in a windows machine using PowerShell you have to assign the blank string to that variable. As you can see below screenshot.

How Do I Set Environment Variables in Windows 10?
To access the existing environment variable in the windows machine, Open the command prompt and issue the set variable_name statement. Here variable_name represents the name of the variable which you want to access.
As you can see from below the screenshot, I am accessing the website environment variable.

Additional FAQs
The answer to the question, “What are environment variables?” is a relatively difficult one. As you can observe from this guide, dealing with Windows programs makes it tough to locate and observe environment variables.
Their management is handled in the background by the OS and the numerous apps and drivers you run on your computer. The OS and your existing programs, on the other hand, rely on them. Your system could malfunction if you mess about with the values of critical system variables without understanding what you’re doing.
What are the default Windows Environment Variables?
Each Windows PC has a vast array of variables. Variables such as OS, TEMP, and PATH are often utilized. You may find default values for Windows environment variables on websites like Wikipedia.
Manage Your System With Ease
Setting environment variables in Windows makes it easy to locate essential files stored on your computer. Creating and managing these variables can be a little confusing at first, but you will soon get the hang of it with this guide. You will now be able to quickly access your important documents using a shortcut instead of typing in a long file location.
Have you set environment variables in Windows? What method did you use? Kindly let us know in the comments below.
Yes, assigning more than one value to the same environment variable is possible. To do this, open the variable and click the “Edit” button. Tap the “New” button to input the additional value.
Changing environment variable using command prompt
Note:- Make sure you are not going to change the variable name.
How to Change the Environment Variable in Windows 11
Here I’m gonna show you, how you can change or edit the environment variable.


Have Control Over Your Env Variables
The same software used for clearing Env Variables can be used to edit or create new ones as well. However, if you’re not sure about it, it’s better to leave it to a professional. Since the variables are the backbone of your Operating System and software, messing with them can result in a system crash. This can be more expensive than asking a professional to deal with them in the first place.
Have you ever tried to clear Env Variables? Have you tried editing or creating new ones? Did you find it difficult? Let us know in the comment section below!
What You Need to Know About Environment Variables
The environment variable is a variable that the computer automatically creates and maintains. It helps the system locate and install applications, check system preferences, and execute commands. You can access it from anywhere on your device.
Why You Need to Environment Variable
Windows Environment variables are used to store the data that are used by windows and other programs. For example, windir environment variable stores the location of the Windows installation directory. Programs can query the value of this variable to find where the files of the Windows operating system are located.
Let’s take another example about environment variable so that you can get more clarity, Suppose you are going to install Python on your machine and then during the installation of the Python it will ask you, to add a python executable file to your environment variable if you do not check that setting and continue the installation. After successfully the installation of Python you are ready to execute any Python script but you have to remember one thing each time you have to specify the location of the Python executable to execute the Python script but if you check that setting during the installation then you don’t need to specify the location of the Python executable each time.
But after the installation of Python or any software you can manually set the environment variable.
Let’s see how can you set a new environment variable in your windows 11 machine.
Note:- All the variable names which I will set, edit and delete throughout this article will just be for testing. You can set your own required environment variable.
You have now set a permanent variable for the system. For the new changes to take effect, you will need to go to RE-START CMD.
How to Find the PATH Variable in Windows 10
You can access the environment variable you have created from different locations. Let’s look at how you can use your variable.
Command Prompt Method
You will now have accessed your new variable using the Command Prompt.
PowerShell Window Method
You have now opened the new variable using the PowerShell Window method.
Start Menu Method
Head to the Start menu and enter the command shown here, replacing “variable” with the name of your new variable.
You have now accessed your new variable using the Start menu.
How to Unset Env Variable in Windows
The operating system’s environment makes use of data stored in environment variables. There is a lot of information we can learn from them about how the software works. Environment variables can be divided into two categories:
There are ways to unset both types of Env Variables. You can do so by using the Environment Variables window, Power Shell, and Registry Editor.
Environment Variables Window
Power Shell can also be used to clear both types of Env Variables effectively. Here is how to clear System Env Variables:
Here’s how to clear System Env Variables using Registry Editor:
Setting Environment Variables in Windows 11
You can take several steps to create environment variables in Windows 11. You will then be able to make and maintain shortcuts that allow you to use the system more efficiently. This is how to set environment variables in Windows 11.
You have successfully set an environment variable.
How to Delete Environment Variable in windows 11
Sometimes you require to delete existing environment variables. With the help of these steps, you can delete any existing environment variables.

Changing Environment Variable using Windows PowerShell
If you want to change the value of the existing environment variable using windows PowerShell, Then you have to re-assign the value of the environment variable. As you can see below the image.

Frequently Asked Questions
Here is some more information about Environment Variables for you:
How Do I Find Environment Variables in Windows 10?
Alternatively, if you just need to see what the variables are but don’t need to change them, you can simply open a command-line interface by hitting Ctrl +Esc and typing “cmd” in the command box, then type “set” in the command window. This prints out all the environment variables that are set on your system.
There are several reasons that you may not be able to set these variables.
Setting Environment Variables from the Command Prompt
If you would like to use terminal to set up environment variables, this is how to go about it.
$ export VAR=variablename

If you would like spaces in your name, you should enclose the name in double-quotes as shown below.
$ export VAR=“variable name”

The $ sign needs to precede the environment variable for the name to be displayed. For example:
You have now set up an environment variable in terminal.
How to Set Environment Variable using Command Prompt
Windows command prompt also provides us with some useful commands to work with windows environment variables. here I am going to show how to set environment variables using a command prompt.

To verify whether the environment variable was created or not, you can execute the set command. This command shows all the environment variables with values.

