How to Set Environment Variables in Windows 10
Environment variables have been a powerful feature of Windows from the earliest days; in fact, they are a legacy from the days of MS-DOS. Despite their age, environment variables are a useful way to control the way Windows operates with a very small footprint in terms of memory usage. For example, one common environment variable is called PATH, which is simply an ordered text string containing a list of directories that Windows should look in for executable files. This allows users to quickly invoke utility programs or other executables without having to know (or care) where those programs live on the hard drive. Setting environment variables is very simple. Here is a quick tutorial on how to set them.
Setting Environment Variables
- Once logged in to Windows, you need to right-click the corner button (the little Windows icon) in the lower left corner of the screen.
- This should open the Power User Task Menu. Depending on your settings, it may open the Start menu instead. If it opens the Start menu, then type Windows-x on your keyboard instead to open the Power User Task Menu.
- Click “System” from the Power User Task Menu displaying on screen.
- Under the “System” menu, you need to find “Advanced System Settings”.
- Click on the “Advanced System Settings” link in the left column under “System”. If it does not appear there, then type “advanced system settings” into the search box and hit return and it will come up.
- Once the Advanced System Settings are open, click on the “Advanced Tab” followed by the “Environment Variables” option you will find on the bottom right side.
- Under the environment variables window, choose or highlight the “PATH” variable in the “System Variables” section shown on window.
- After highlighting PATH variable from “System Variables” click the Edit button.
- You can add or modify the path lines with the directories you want your computer to look in for executable files.
- You will find that each different directory is separated with a semicolon, for example:-
- There are other environment variables “System Variables” section which you can examine by clicking Edit.
There are different environment variables, such as PATH, HOME and USER PROFILE, HOME and APP DATA, TERM, PS1, MAIL and TEMP etc. These variables are very useful and can be used in scripts as well as on the command line. For more information about using the command line, check out this TechJunkie tutorial.