How to use global system environment variables in windows

Different programs and processes require different environments to run. On a single machine, Windows needs to make sure that all programs and processes can access the environments they need.

To do this, Windows needs to know the kind of environment every program requires to work. Windows must store this information somewhere for easier retrieval. Environment variables make that possible.

Environment variables are, in short, data storing mechanisms.

Let’s dig a little deeper to see how environment variables work and how you can create, edit, and delete them effectively.

What Are Environment Variables in Windows 10?

Environment variables are dynamic variables that store data related to creating different environments for different programs and processes.

To understand them better, let us take the example of a program that needs to use a built-in Windows tool to run.

For the program to use the tool, the program needs to know the tool’s location to access it. The program also needs to find out if it has permission to use the tool or not. Similarly, there are things that a program needs to know before it can use the tool.

So, a program can access all of this information by asking Windows. Windows then looks up environment variables (EVs) for this data and creates an environment in which that program can run.

In other words, EVs store data that is accessible to every program and process running on the system across all users. The data these variables store helps the programs run in the environment they were designed for.

Some of the most important EVs on Windows include PATH, HOMEPATH, and USERNAME. All of these variables contain values that any user and process of the system can access at any time. For instance, the USERNAME environment variable contains the name of the current user. Windows can look up this variable whenever it needs to find out the name of the current user.

How to Set Environment Variables in Windows 10?

First things first, if you want to set system-wide EVs, you need to have administrative privileges. So, if you are not the admin, inform your system administrator and ask for their help.

Now that you have admin privileges:

  1. Type Advanced system settings in the Start menu search box and select the Best match.
  2. In the System Properties box, click on Environment Variables to open the Environment Variables panel.

The EVs panel lists two types of variables depending upon your need. If you want to change EVs for the current user only and don’t want the changes to reflect system-wide, you will change User variables.

On the contrary, if you want system-wide changes, you will change System variables.

Let’s say you’ve just installed Java and want to add the java path to the EVs. To do this:

  1. Click on New under the User/System variables. This will open up the New User Variable box.
  2. Enter JAVA_HOME in the Variable name field and browse to the directory where you’ve installed Java to populate the path in Variable value.

Pressing OK will add the JAVA_HOME variable to the PATH variable.

How to Edit Environment Variables

To edit different environment variables, select any variable from the list. Then, press Edit. This will open up the Edit environment variable panel. Here you can create, delete, and edit variables.

From the list of variables, select the one that you want to modify and click on Edit. Afterward, you can change the variable value to anything you like.

You can also delete the variables in a similar fashion.

What Is the Windows PATH Variable and How Can I Change it?

In simple terms, the PATH variable is an address book of programs and commands on your computer. Whenever you have a new program on your computer that you want to run from the command line interface, you must specify its address in the PATH variable.

Related: How to Generate a List of All Installed Programs in Windows

A thing to remember here, not all programs are in the PATH environment variable. Only the programs that are meant to be used from the command line interface appear in the PATH variable. So, programs intended to be used from a Graphical User Interface don’t have their addresses in the PATH variable.

The way the process works involves Windows looking up the address for a certain command. Whenever you issue a command on a command line, Windows first searches the current directory for the command. If the OS can’t find it in the current directory, it looks up the PATH variable to find the address.

Related: How to Set the PATH Variable in Linux

To enter an address in the PATH variable, the process is the same as before. Open up the Environment Variable box, select the PATH variable, and click on Edit.

In the Edit box, you can add, remove, and edit directories.

One final thing to remember, the PATH variable is not the same for every user on a system. So different users can list different directories without changing the variable for every user. So, if you want a tool to be available for every user, you have to edit the PATH variable under the System Variables.

Environment Variables in Windows 10 Store Data that Programs Need to Work

Programs need data to work. To make sure that data is available efficiently, Windows stores this data in global variables that all programs can access. These global variables are Environment Variables.

You can add, edit, and remove Environment Variables inside the Advanced System Settings panel.

Furthermore, if you have more than one user on a machine, user Environment Variables will be different for each user. For instance, one user may have listed a command under the PATH variable that won’t be available for other users.

On the other hand, system EVs are available for all users. These variables require admin privileges to edit or delete.

In short, EVs are Windows’ way to store important data. So, be sure you know what you are doing before modifying them.

Learn how to access Python from anywhere on the command line by adding it to your Windows PATH variable.

About The Author

Fawad Murtaza
(23 Articles Published)

Fawad is a full-time freelance writer. He loves technology and food. When he is not eating or writing about Windows, he is either playing video games or writing for his quirky blog Techsava.

From Fawad Murtaza

Subscribe To Our Newsletter

Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals!

One More Step…!

Please confirm your email address in the email we just sent you.

Windows 10 supports a number of legacy features from older versions of the operating system. One of those legacy features is the environment variable.

How to use global system environment variables in windows

Environment variables offer a useful way to control the way Windows operates with an extremely 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 when an executable file is called.

The PATH environment variable allows users to quickly launch programs without having to know where those programs live on the hard drive.

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.

How Do I Set Environment Variables in Windows 10?

Once logged in to Windows, right-click the Windows button in the lower-left corner of your screen. This will open up the Power User Tasks Menu.

Depending on your settings, this process may open the Start menu instead. If it opens the Start menu, type “Windows-x on your keyboard to open the Power User Task Menu.

How to use global system environment variables in windows

Click System from the Power User Task Menu that’s displayed on the screen.

How to use global system environment variables in windows

Under the System menu, you need to click the Advanced System Settings.

If you can’t find Advanced System Settings there, type “advanced system settings” into the search box and hit return to bring it up.

How to use global system environment variables in windows

Once Advanced System Settings is open, click on the Advanced tab, then look on the bottom-right side for the Environment Variables.

How to use global system environment variables in windows

Next, to create a new environment variable, click New.

How to use global system environment variables in windows

A dialog box will pop up, allowing you to enter a new variable name and to set its initial value:

  • New adds a new environment variable.
  • Edit lets you edit whatever environment variable you have selected.
  • Delete lets you delete the selected environment variable.

Save any changes that you make by clicking OK.

How to Find the PATH Variable

Under the Environment Variables window, choose or highlight the PATH variable in the System Variables section shown in the window.

How to use global system environment variables in windows

After highlighting the 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 in the System Variables section that you can examine by clicking Edit.

Likewise, there are different environment variables, such as PATH, HOME and USER PROFILE, HOME and APP DATA, TERM, PS1, MAIL, TEMP, and so on. These Windows environment variables are very useful and can be used in scripts as well as on the command line.

Speaking of the command line, you can test your changes by opening a new PowerShell window and entering the following:

Frequently Asked Questions

Here is some more information about Environment Variables for you:

How Do I Find Environment Variables in Windows 10?

To find environment variables in Windows 10, you can follow the steps described above to find the environment variable information tucked away inside the system’s advanced settings.

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.

Why can’t I edit the Environment Variables?

There are several reasons that you may not be able to set these variables. The first of your problems could be that you don’t have Admin rights. To set or edit this function, you must be the Administrator of the system.

If you are the Admin, yet the edit function is greyed out, try accessing the Environment Variables by accessing the Control Panel from the Start menu. Click on ‘Advanced System Settings,’ then click ‘Environment Variables.’

Final Thoughts

Windows 10 environment variables make it incredibly easy to take control of your Windows device and make it run more efficiently.

To find and set environment variables in Windows 10, follow the simple steps laid out in this article to get started.

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.

How to use global system environment variables in windows

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.

How to use global system environment variables in windows

4. In order to edit a variable, select that variable and press the Edit button to change the Name or Press OK afterwards.

How to use global system environment variables in windows

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.

How to use global system environment variables in windows

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.


Consider the following scenario:

You use a user account (user account A) to log on to a Windows Server 2008 SP2-based computer.

You create a system environment variable that refers to the COMPUTERNAME environment variable. For example, you create the system environment variable by following these steps:

In the search box in Control Panel, you type Advanced system settings . Then, you click System Properties.

On the Advanced tab, you click Environment Variables.

You create a new system variable by using the name “sample” and the variable value “%computername%.”

You press Ctrl+Alt+Del to switch to another user account on the computer.

You switch back to user account A.

You open a command prompt from the Start menu or by running cmd.exe from the Search programs and files search box. Then, you try to verify the system variable by running the following command:

In this scenario, the system environment variable is not resolved correctly. More specifically, the command unexpectedly returns the following message:

You expect the command to return the computer name.

This issue occurs only when you open the command prompt from the Start menu or by running cmd.exe from the Search programs and files search box. For example, if you open a command prompt from Windows Task Manager, this issue does not occur.


Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a “Hotfix download available” section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website: The “Hotfix download available” form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.


To apply this hotfix, you must be running Windows Server 2008 SP2.

For more information about how to obtain a Windows Server 2008 service pack, click the following article number to view the article in the Microsoft Knowledge Base:

968849How to obtain the latest service pack for Windows Server 2008

Registry information

To apply this hotfix, you do not have to make any changes to the registry.

Restart requirement

You must restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

The global version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.

Windows Server 2008 file information notesImportant Windows Vista hotfixes and Windows Server 2008 hotfixes are included in the same packages. However, only “Windows Vista” is listed on the Hotfix Request page. To request the hotfix package that applies to one or both operating systems, select the hotfix that is listed under “Windows Vista” on the page. Always refer to the “Applies To” section in articles to determine the actual operating system that each hotfix applies to.

The files that apply to a specific product, SR_Level (RTM, SP n), and service branch (LDR, GDR) can be identified by examining the file version numbers as shown in the following table.

    tutorial by Codrut Neagu published on 12.09.2020

How to use global system environment variables in windows

Environment variables are user variables or Windows system variables that describe the environment in which apps run. They can tell your apps things like the name of the computer, the name of the user account, the current working directory, etc. Do you want to know more about how to use environment user variables and Windows system variables? If you do, read this tutorial and learn how to create environment variables in Windows 10. There are some situations in which knowing how to do that can prove very useful.

NOTE: To create user variables and Windows system variables, you have to access the Environment Variables window. If you don’t know how to do that, a quick way to do it is by executing the command “rundll32.exe sysdm.cpl,EditEnvironmentVariables” in the Run window (Win + R). However, there are other ways to open it, which we covered in this guide: What are Environment Variables in Windows?.

How to create environment user variables in Windows 10

User environment variables are available only to your user account. When creating such variables, their values should include paths towards locations that are accessible to your user account. For example, you can’t have your user variable point to a personal folder of another user account (like Documents, Pictures, Music, etc.). In the “User variables for [user account]” section, click or tap New.

The Windows 10 Environment Variables window

The “New User Variable” window opens. Start by typing the name of the variable you want to create (1). Make it something suggestive so that you can easily remember its purpose. Then, type its value (2).

The value may include a path or more. A path can point to a folder or a file. You can also use other existing variables to build up the path you want. For example, you can use a value like %Userprofile%Desktop to point the variable to your user account’s Desktop. If you want it to have more than one value, separate the values with semicolons (;) — for example, Path 1; Path 2; Path 3.

Entering the name and value of a new user variable

NOTE: It is not mandatory to use only paths to folders and files as values for user variables. Depending on what you want to do with the variable you create, you can also store strings of text as its value.

When you are done setting the user variable, click or tap OK. The new variable is added to the list of user variables, but it is not yet created, so you can’t use it at this time.

The new user variable has been added to the list

For the new environment variable to be created, in the Environment Variables window, click or tap OK.

Saving the new user variable in Windows 10

To test if the user variable was created successfully and that it points to what you want, open a Run window (Windows + R). Type the name of the environment variable you just created, between percent (%) signs. For example, to execute the digitalcitizen variable we just created, we had to type %digitalcitizen%. Then, we pressed OK. In our case, it opened the digitalcitizen folder found in our user’s Documents.

Checking a user variable in Windows 10

IMPORTANT: Any user can add, change, or delete user environment variables. User variables can be created by Windows 10, apps, and users alike.

How to create Windows system variables in Windows 10

The process for creating system variables is the same as for creating user variables. To make sure you get it right, let’s go through another quick example.

In the System variables section, click or tap New.

Starting the process of creating a new Windows system variable

The New System Variable window opens. Enter the name of the variable (1) and its value (2). Note that you can add multiple values to a variable – all you need to do is separate them with semicolons (;).

Entering the name and value of a New System Variable

IMPORTANT: If you specify a path as a value for a system variable, that path should be accessible to all user accounts. If that path points to a location where only one user account has access, you should create a user variable instead of a system variable.

When you are done customizing the new system variable, click or tap OK. The new variable is added to the list of system variables, but it is not yet created.

The Windows system variable has been added to the list

In the Environment Variables window, click or tap OK so that the new environment variable is created.

Saving a new Windows system variable

To test if the user variable was created successfully, open Run (Windows + R) and insert the name of the environment system variable you created, between percent (%) signs. For example, to run the Games variable that we created, we had to type %Games%. Then, we pressed OK.

Verifying a Windows system variable

Windows opened the Games folder where all games are installed on our Windows 10 test computer. All users have access to this folder, and they can use this variable to access those games quickly.

IMPORTANT: Are you wondering whether any user can add system environment variables or change existing ones’ values? The answer is NO! Only administrators can perform these actions. Standard users don’t have enough clearance to make or change Windows system variables because they affect every user and every app on the PC. This tutorial provides more details about standard and Administrator accounts.

What user variables or Windows system variables did you create?

The process involved in creating environment variables in Windows 10 is not that complicated. However, before you get the hang of it, you should experiment first by making a couple of safe user variables that don’t negatively impact the system’s functioning.

James Walker | February 24, 2021 July 18, 2019 | How-To

To set an environment variable in Windows 10:

  1. Search for “edit environment variable” in the Start menu.
  2. From the popup which appears, select the variable to edit and press “Edit”, or click “Create”.
  3. Change the name and value of the variable to your new values.

Environment variables are global values used to configure programs running on your PC. Although they sound technical, they’re really just a shared configuration store for different apps to hook into.

Environment variables are tied to individual user accounts, so different users can have different configurations. There are also global system variables, such as “%windir%”, which always points to the directory where Windows is installed (e.g. “C:Windows”). Instead of hardcoding this value, apps can instead reference “%windir%” when they need to access the Windows directory.

How to use global system environment variables in windows

Many apps add their own environment variables after installation. To view and edit your environment variables, search for “edit environment variables” in the Start menu and select the result which appears.

Here, you can see all the environment variables which have been set on your machine. In the example above, you can see the “OneDrive” variable points to the OneDrive storage directory for the current user – if you change the OneDrive directory from the OneDrive system tray, this value will update accordingly.

How to use global system environment variables in windows

Because OneDrive is an environment variable, programs can get the location of your OneDrive directory using “%OneDrive%” in paths. You can even try this out yourself – press Win+R to open the Run prompt and type “%OneDrive%” to open your OneDrive folder.

To edit an environment variable, select it from the list and click “Edit.” Use the popup prompt to change the variable’s name and value. However, take care when editing variables you didn’t create – an incorrect value could prevent a program, or the entire system, from running properly.

How to use global system environment variables in windows

Creating a new variable is a similarly simple affair – click the “New” button and fill out the name and value. Remember though that environment variables do nothing on their own. Since no program will use your variable, it will have no effect. However, you can get the value of your environment variable using the Command Prompt – launch it from the Start menu and type “echo % %”, replacing ” ” with your variable’s name, to see its value displayed.

Up your PowerShell game with environment variables, in Part 2.5 of the “Variables in shells” miniseries.

How to use global system environment variables in windows

Subscribe now

Get the highlights in your inbox every week.

Environment variables are global settings for your Linux, Mac, or Windows computer, stored for the system shell to use when executing commands. Many are set by default during installation or user creation.

For instance, your home directory is set as an environment variable when you log in. How it looks in PowerShell depends on your operating system.

You usually don’t use environment variables directly, but they’re referenced by individual applications and daemons as needed. However, environment variables can be useful when you want to override default settings, or when you need to manage new settings that your system has no reason to create on its own.

This article is about environment variables in the open source PowerShell environment, and so it’s applicable to PowerShell running on Windows, Linux, and Mac. Users of the Bash shell should refer to my article abou t Bash environment variables.

For this article, I ran PowerShell on the open source operating system Linux. The commands are the same regardless of your platform, although the output will differ (for instance, it is statistically unlikely that your username is seth).

What are environment variables?

  • Top 7 terminal emulators for Linux
  • 10 command-line tools for data analysis in Linux
  • Download Now: SSH cheat sheet
  • Advanced Linux commands cheat sheet
  • Linux command line tutorials

In PowerShell, environment variables are stored in the Env: “drive”, accessible through the PowerShell environment provider, a subsystem of PowerShell. This isn’t a physical drive, but a virtual file system.

Because environment variables exist in the Env: drive, you must prepend Env: to the variable name when you reference them. Alternatively, you can set your working location to the Env: drive with the Set-Location command so you can treat all environment variables as local variables:

Environment variables convey information about your login session to your computer. For instance, when an application needs to determine where to save a data file by default, it usually calls upon the HOME environment variable. You probably never set the HOME variable yourself, and yet it exists because most environment variables are managed by your operating system.

You can view all environment variables set on your system with the Get-ChildItem command from within the Env: drive. The list is long, so pipe the output through out-host -paging to make it easy to read:

If you’re not in the Env: drive, then you can do the same thing by adding Env: to your command:

Environment variables can be set, recalled, and cleared with some of the same syntax used for normal variables. Like other variables, anything you set during a session only applies to that particular session.

If you want to make permanent changes to a variable, you must change them in Windows Registry on Windows, or in a shell configuration file (such as

/.bashrc) on Linux or Mac. If you’re not familiar with using variables in PowerShell, read my variables in PowerShell article before continuing.

What are environment variables used for?

Different environment variables get used by several different systems within your computer. Your PATH variable is vital to your shell, for instance, but a lot less significant to, say, Java (which also has paths, but they’re paths to important Java libraries rather than general system folders). However, the USER variable is used by several different processes to identify who is requesting a service.

An installer wizard, like the open source Nullsoft Scriptable Install System (NSIS) framework, updates your environment variables when you’re installing a new application. Sometimes, when you’re installing something outside of your operating system’s intended toolset, you may have to manage an environment variable yourself. Or, you might choose to add an environment variable to suit your preferences.

How are they different from regular variables?

When you create a normal variable, the variable is considered local, meaning that it’s not defined outside of the shell that created it.

For example, create a variable:

Launch a new shell, even from within your current shell:

Environment variables, on the other hand, are meant to be global in scope. They exist separately from the shell that created them and are available to other processes.

How do you set an environment variable?

When setting an environment variable, you should be explicit that it is an environment variable by using the $Env: notation:

As a test, launch a new session and access the variable you’ve just created. Because the variable is an environment variable, though, you must prepend it with $Env::

Even though you’ve made a variable available to child processes, it’s still just a temporary variable. It works, you can verify that it exists, you can use it from any process, but it is destroyed when the shell that created it is closed.

How do you set environment variables in your profile?

To force an environment variable to persist across sessions, you must add it to your PowerShell profile, such as your CurrentUser,AllHosts profile, located in HOME/Documents/Profile.ps1:

With this line added, any PowerShell session launched instantiates the FOO environment variable and sets its value to hello world.

There are currently six default profiles controlling PowerShell sessions, so refer to the Microsoft dev blog for more information.

How do you discover new environment variables?

You can create and manipulate environment variables at will, and some applications do just that. This fact means that many of your environment variables aren’t used by most of your applications, and if you add your own arbitrary variables then some could be used by nothing at all.

So the question is: How do you find out which environment variables are meaningful? The answer lies in an application’s documentation.

Python, for instance, offers to add the appropriate Python path to your Path environment variable during install. [Note: PATH?] If you decline, you can set the value yourself now that you know how to modify environment variables.

The same is true for any application you install: The installer is expected to add the appropriate variables to your environment, so you should never need to modify Env: manually. If you’re developing an application, then your installer should do the same for your users.

To discover significant variables for individual applications, refer to their user and developer documentation.

Anaconda is an open-source software that contains Jupyter, spyder, etc that are used for large data processing, data analytics, heavy scientific computing. Anaconda works for R and python programming language. Spyder(sub-application of Anaconda) is used for python. Opencv for python will work in spyder. Package versions are managed by the package management system called conda.

What is the environment variable?

Environment variables basically define the behavior of the environment. They can affect the processes ongoing or the programs that are executed in the environment. The region from which this variable can be accessed or over which it is defined is termed as the scope of the variable.

Steps for setting up the environment variable:


  • Download Anaconda for Python. Make sure to download the “Python 3.7 Version” for the appropriate architecture.
    How to use global system environment variables in windows
  • After the download is over, go through How to install Anaconda on windows? and follow the given instructions.
  • After the installation is done, we need to setup the environment variable.
    Go to Control Panel -> System and Security -> System
    Under Advanced System Setting option click on Environment Variables as shown below:
    How to use global system environment variables in windows

How to use global system environment variables in windows

  • Now, we have to alter the “Path” variable under System variables so that it also contains the path to the Anaconda environment. Select the “Path” variable and click on the Edit button as shown below:
    How to use global system environment variables in windows
  • We will see a list of different paths, click on the New button and then add the path where Anaconda is installed.
    How to use global system environment variables in windows
  • Click on OK, Save the settings and it is done !! Now to check whether the installation is done correctly, open command prompt and type anaconda-navigator. It will start the anaconda navigator App, if installed correctly.
  • Linux

    In Linux, there are several ways to install Anaconda. But we will refer to the simplest and easy way to install Anaconda using terminal. Go through How to install Anaconda on Linux? and follow the instructions. Generally, the Path variable is automatically set in Linux at the time of installation, but it can also be set manually by following steps:

    • Go to Application -> Accessories -> Terminal
    • For setting up Environment Variable, type the following command in the Terminal with the use of Installation path:

    For setting up the Environment Value, type the following command in the Terminal with the use of Installation path:

  • It is done!! Now to check whether the installation is done correctly, open Terminal and type anaconda-navigator. It will start the anaconda navigator App, if installed correctly.
  • Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

    To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course

    – Last updated on November 15, 2010 by VG

    Environment variables work like placeholder or alias for drives, file/folder names and various paths in Windows operating system.

    We here at AskVG frequently use environment variables references in our tutorials like %windir%\Resources, %programfiles%\Internet Explorer, etc. Many people don’t know about them and get confused how to access the mentioned path.

    So today we are going to list some important and frequently used system-defined environment variables in this article which will help you in better understanding them.

    Most of these environment variables are same for older Windows versions such as Windows XP and newer Windows versions such as Windows Vista or later but some are different. So we are listing them separately for Windows XP and other Windows versions.

    You can access the list of Environment Variables present in your computer using System properties -> Advanced -> Environment Variables button.

    How to use global system environment variables in windows

    You can also directly access it using control sysdm.cpl,system,3 command in RUN dialog box.

    Windows XP Environment Variables

    Environment Variable Path
    %ALLUSERSPROFILE% C:\Documents and Settings\All Users
    %APPDATA% C:\Documents and Settings\Username\Application Data
    %COMMONPROGRAMFILES% C:\Program Files\Common Files
    %COMMONPROGRAMFILES(x86)% C:\Program Files (x86)\Common Files
    %COMSPEC% C:\Windows\System32\cmd.exe
    %HOMEPATH% C:\Documents and Settings\Username
    %PROGRAMFILES% C:\Program Files\
    %PROGRAMFILES(X86)% C:\Program Files (x86)\ (only in 64-bit version)
    %SystemDrive% C:\
    %SystemRoot% C:\Windows\
    %TEMP% and %TMP% C:\Documents and Settings\Username\Local Settings\Temp
    %USERPROFILE% C:\Documents and Settings\Username
    %WINDIR% C:\Windows\

    Windows Vista, Windows 7, Windows 8/8.1 and Windows 10

    Environment Variable Path
    %ALLUSERSPROFILE% C:\ProgramData\
    %APPDATA% C:\Users\Username\AppData\Roaming
    %COMMONPROGRAMFILES% C:\Program Files\Common Files
    %COMMONPROGRAMFILES(x86)% C:\Program Files (x86)\Common Files
    %COMSPEC% C:\Windows\System32\cmd.exe
    %HOMEPATH% C:\Users\Username
    %LOCALAPPDATA% C:\Users\Username\AppData\Local
    %PROGRAMDATA% C:\ProgramData\
    %PROGRAMFILES% C:\Program Files\
    %PROGRAMFILES(X86)% C:\Program Files (x86)\ (only in 64-bit version)
    %PUBLIC% C:\Users\Public\
    %SystemDrive% C:\
    %SystemRoot% C:\Windows\
    %TEMP% and %TMP% C:\Users\Username\AppData\Local\Temp
    %USERPROFILE% C:\Users\Username
    %WINDIR% C:\Windows\

    NOTE: Here C: is the system drive where Windows is installed in your system. It might differ for you if you installed Windows in a different drive in your system.

    About the author: Vishal Gupta (also known as VG) has been awarded with Microsoft MVP (Most Valuable Professional) award. He holds Masters degree in Computer Applications (MCA). He has written several tech articles for popular newspapers and magazines and has also appeared in tech shows on various TV channels.


    NOTE: Older comments have been removed to reduce database overhead.


    Thank you was looking all-around for this..

    This has been very helpful. Thank you very much 5stars

    ‘VB.NET code:
    Dim strTempFolder As String = Environ(“TEMP”)

    @ Abhishek….and any one else interested…
    search “Environment.GetEnvironmentVariables Method”.

    Try something like this. Very simple

    Dim strDir As String

    There is also %USERNAME% on Windows 7 at least.

    thank you very much very helpful……

    My desktop files is not recognised as internal or external cmd