How to Set Environment Variables in Windows 11

In this article, you will learn how you can add or edit new Windows PATH environment variables in your Windows 11. It is very important to set PATH variables when you install any software. Most of the time, programs will add their own custom shortcuts to the Windows PATH environment. But if not added, you have to add them manually.

System PATH variable allows users to run executables saved on your system path without sharing the full path of the executables.

How to set path and environment variables in Windows 11

Environment variables allow users to locate executable files without having to search for them. Environment variables create shortcuts to executables in defined directories.

Follow these steps:

Step 1: First open Windows 11 settings with Windows + I button on your keyboard. You can also use Windows search to find the Settings app.

Step 2: In Windows 11 settings, find and click on System.

Step 3: In the System settings, find the about option in the right sidebar.

click System, and select the About

Step 4: In the about section, find and click on Advanced system settings. This will open system properties.

click on Advanced system settings

Step 5: In the system properties, find and click on the Advanced tab.

Step 6: Then click the Environment Variables located at the bottom of the tab.

In the System Properties window, click the Advanced tab

Step 7: Here you have to add new System variables to your new Windows 11. If you add a user variable then only that user can access that new variable.

Step 8: Select the path option in the System variables section and click the Edit button.

Select the Path variable in the System variables

Step 9: Here click on the new button to add new paths or edit to modify the existing path. You can also delete the old path if you want.

click the New button to add new paths

Step 10: If you don’t know the path, you can use the browse button to find and select the path for system variables.

C:\Program Files;C:\Windows;C:\Windows\System32

Once done, click on OK to save the setting.

Restart your PC and it’s done.

Set Environment Variable in Windows using the RUN command

You can also use the Run command tool to set a new environment.

Step 1: Press Windows + R button on your keyboard to open the RUN command tool.

Step 2: Then in the RUN tool, enter sysdm.cpl and then press enter.

Type in sysdm.cpl and click OK

Step 3: This will open the System Properties window. Here find and click on the Advanced tab.

Open the Advanced tab and click on the Environment Variables

Step 4:  Click on the Environment Variables in the System Properties.

click the New… button under the appropriate section

Step 5: To add a variable, click the New button.

Step 6: Enter the variable name and value> then OK.

Enter the variable name and value in the New User Variable

Set Environment Variable in Windows Using Command Prompt

You can also change and add new system environment variables using the command prompt tool. Follow these steps:

Step 1: First open the command prompt tool. (Open the start menu with the Windows button on your keyboard > search for CMD > select run as administrator)

Step 2: Then in the cmd tool, type this command and press enter.

setx [variable_name] “[variable_value]”

[variable_name]: The name of the environment variable

[variable_value]: The value you want to assign

enter the command setx Test_variable Variable value

Step 3: If you want to add a system variable then you can use the following command.

setx [variable_name] “[variable_value]” /M

Then restart your system to apply new changes.

Related Posts:

Final Words

If you have installed any software to interact with the system then you have to set its variables in the system path. Otherwise, it won’t work correctly. Hope you understand the whole process.

Rahul Patel
Rahul Patel

Rahul is a blogger and a tech geek. By reviewing the latest technology and finding the solution of pesky errors, he feels immense pleasure. Driven by his innate interest in blogging, he adapted blogging as a full-time profession 4 years ago.

Articles: 110