Environment variables are the values that contain all the information regarding system environment. Every process inside Windows OS has a block that contains a set of environment variables and their values. There are two kinds of environment variables i.e. User Environment Variables and System Environment Variables. As the name represents, user environment variables are set for every user while system environment variables are for everyone who uses the system.
Any user working on command prompt or batch scripts will be well aware of environment variables because of the repetition of a value again and again. Every environment variable has two parameters i.e. name and value. So, you can edit or create your own environment variables in order to ease the work for yourself. So, in this guide, I will discuss about the way to edit environment variables in Windows 10.
Editing Environment Variables:
In order to edit environment variables, follow the steps below to access them.
Navigating to Environment Variables Using Command Prompt:
1. If you want to have access to both the variables i.e. user and system variables, then, open an elevated Command Prompt by right clicking over the Start Menu icon and selecting Command Prompt (Admin) from the list.
2. While inside the command prompt, type or copy/paste the following command stated below. You can paste the command by right clicking inside Command prompt and selecting Paste. Hit the Enter key to execute the command.
Command: rundll32.exe sysdm.cpl,EditEnvironmentVariables
3. After hitting Enter, Environment Variables window will pop-up with a section for User variables and another section for System variables.
4. In order to edit a variable, select that variable and press the Edit button to change the Name or Press OK afterwards.
5. If you want to create a new environment variable for yourself, then, click over the New button and type the Name and Value for that particular variable followed by the OK
Navigating to Environment Variables Manually
1. Press Win+ X keys on the keyboard and select System from the list.
2. Inside the System window, click on Advanced system settings located at the left pane.
3. Inside the advanced system settings, click on the Environment Variables button at the bottom and do follow the same procedure to edit environment variables as described above.