All Collections
System requirements
Set Permanent "System Environment" Variable
Set Permanent "System Environment" Variable
Ha Ngan Nguyen avatar
Written by Ha Ngan Nguyen
Updated over a week ago

For macOS

Set Permanent Environment Variable

The environment variables are stored in the .bash_profile file OR the .zshrc file:

1. To find out, go to Terminal, input ps -p $$, then check the return result:

  • If return

Then find the path to .zshrc by using:


  • If return

Then find the path to .bash_profile by using:


2. Open the .zshrc or .bash_profile file with a text editor of your choice.

3. Scroll down to the end of the .zshrc or .bash_profile file.

4. Use the export command to add new environment variables:

export [variable_name]=[variable_value]


5. Save any changes you made to the .zshrc or .bash_profile file.

6. Execute the new .zshrc or .bash_profile by either restarting the terminal window or using:

source ~/.zshrc
source ~/.bash_profile

7. Verify Environment Variable:


That’s done

For Windows 10

  1. On the Windows taskbar, right-click the Windows icon and select System.

  2. In the Settings window, under Related Settings, click Advanced system settings.

3. On the Advanced tab, click Environment Variables.

4. Click New to create a new environment variable.

5. Input Variable name and Variable value (Example: CF_DISABLE_APP_AUTO_UPDATE /true)

6. After creating the environment variable, click Apply and then OK to have the change take effect.

7. Verify the environment variable:

Did this answer your question?