Q100017: How to list environment variables

Follow

SUMMARY

The following article details how to list environment variables for each platform or inside Foundry applications. Environment variables are dynamic-named values which can be used to alter the behaviour of a process that uses them.


MORE INFORMATION

Below are instructions for how to list all the environment variables set for each platform or from within a Foundry application:

Windows

1) Select Start and search for Command Prompt.
2) In the command window that opens, enter set.


A list of all the environment variables that are set is displayed in the Command Prompt window as shown below:

 

Linux and macOS 1) Launch Terminal or a shell.
2) Enter printenv.

A list of all the environment variables that are set is displayed in the Terminal or Console window as shown below:
Inside Applications
Open the Script Editor/Python Console/Python tab and run the following command:
import os
print(os.environ)



FURTHER READING

More information about handling environment variables can be found here:

Q100015: How to set environment variables

Q100127: How to delete or unset environment variables

Q100679: How to get environment variable values

 

    We're sorry to hear that

    Please tell us why