Documentation – Current v2020.1

Editing System Environment Variables

Select Your Operating System:

Here you can find help on how to change the environment variables on your computer. Click on your operating system above to see specific instructions.

Windows Instructions

Adding or editing Windows environment variables is done through the Control Panel. Follow the steps below to change your system’s environment variables.

Note: Changing Windows environment variables requires Administrator Access.

  • Open the Control Panel.
  • Click System and Security, then System
  • Click Advanced system settings on the left
  • Inside the System Properties window, click the Environment Variables… button.
  • Click on the property you would like to change, then click the Edit… button. If the property name is not listed, then click the New… button.
  • If the property is a list of the directories or files, such as the PATH property, then click the the New button and add the file or directory path to the list. You can also use the Browse… button to open a file explorer window and navigate to the desired file or directory.
  • If the property is a plain text value, type in the variable value (and name, if it is a new variable).
  • Click OK on each of the windows to save the changes. Note, for some properties, you may need to restart your computer before the changes take effect.


OS X Instructions

To permanently set an environment variable in mac OS X, you will need to edit the .bash_profile file located in your home directory with your preferred text editor.

At the end of the file, add an export command, followed by the variable’s name and value.

For example, to add a variable named MCR_CACHE_SIZE and set its value to 900000000, you would add this line to your .bash_profile file:

export MCR_CACHE_SIZE=900000000

To append a value to an existing variable, you can use this syntax:

export PATH=$PATH:/usr/local/Imatest/v4.5/IT/bin

This will append :/usr/local/Imatest/v4.5/IT/bin to the existing value of the PATH variable.

The change will not take immediate effect. To load the new variable into the current environment, you either need log out and log back in to your computer, or execute the source command on your .bash_profile file using a terminal:

>> source ~/.bash_profile

You can verify the variable is set correctly using the echo command in the terminal:

>> echo $MCR_CACHE_ROOT
900000000


Linux Instructions

User Environment Variables

User environment variables only affect a single user. They will not be applied to other users of the system. If multiple users will be using the same computer, they will each need to set the environment variables in their own .bashrc files.

To permanently set a user environment variable in Linux, you will need to edit the .bashrc file located in your home directory with your preferred text editor.

At the end of the file, add an export command, followed by the variable’s name and value.

For example, to add a variable named MCR_CACHE_SIZE and set its value to 900000000, you would add this line to your .bashrc file:

export MCR_CACHE_SIZE=900000000

To append a value to an existing variable, you can use this syntax:

export PATH=$PATH:/usr/local/Imatest/v4.5/IT/bin

This will append :/usr/local/Imatest/v4.5/IT/bin to the existing value of the PATH variable.

The change will not take immediate effect in your terminal. To load the new variable into the current environment, you either need to close your terminal session and start another one, or execute the source command on your .bashrc file:

>> source ~/.bashrc

You can verify the variable is set correctly using the echo command:

>> echo $MCR_CACHE_ROOT
900000000