How to edit environment variables in Windows 10

Environment variables are values that contain all the information regarding the system environment. Every process within the Windows OS has a block that contains a set of environment variables and their values. There are two kinds of environment variables, namely User Environment Variables and System Environment Variables. As the name suggests, user environment variables are set for each user, while system environment variables apply to everyone using the system.

Any user working with the command prompt or batch scripts will be well aware of environment variables due to the repetition of values. Every environment variable has two parameters: name and value. Therefore, you can edit or create your own environment variables to make your work easier. In this guide, I will discuss the ways 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 the 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 on 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 provided below. You can paste the command by right-clicking inside the Command Prompt and selecting ‘Paste.’ Press the Enter key to execute the command.

environment variables1

Command:    rundll32.exe sysdm.cpl,EditEnvironmentVariables

3. After pressing Enter, the Environment Variables window will pop up, featuring a section for User Variables and another for System Variables.

environment variables2

4. To edit a variable, select the desired variable and press the Edit button to change its name. After making adjustments, press OK.

environment variables3

5. If you want to create a new environment variable for yourself, then click on the “New” button, and type the name and value for that particular variable, followed by clicking “OK.
environment variables4

Navigating to Environment Variables Manually.

1. Press the Win + X keys on the keyboard and select ‘System’ from the list.

2. Inside the System window, click on Advanced System Settings located in the left pane.

environment variables5

3. Within the advanced system settings, click on the Environment Variables button at the bottom, and follow the same procedure to edit environment variables as described above.

environment variables6

ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.