GetEnvironment["var"]
gives the setting corresponding to the variable "var" in the operating system environment.
GetEnvironment[{"var1","var2",…}]
gives a list of rules, corresponding to specified environment variables.
gives information about all existing settings in the operating system environment.


GetEnvironment
GetEnvironment["var"]
gives the setting corresponding to the variable "var" in the operating system environment.
GetEnvironment[{"var1","var2",…}]
gives a list of rules, corresponding to specified environment variables.
gives information about all existing settings in the operating system environment.
Details

- GetEnvironment[All] is the same as GetEnvironment[].
- GetEnvironment returns results in the form "var"->value, where value is the value of a corresponding environment variable "var".
- If the variable "var" is found in the environment, the value is a string, possibly empty.
- If the variable "var" is not defined in the environment, GetEnvironment returns "var"->None.
- Names and values of the variables defined in the operating system environment depend on the computer system you are using.
See Also
Related Guides
History
Text
Wolfram Research (2012), GetEnvironment, Wolfram Language function, https://reference.wolfram.com/language/ref/GetEnvironment.html.
CMS
Wolfram Language. 2012. "GetEnvironment." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GetEnvironment.html.
APA
Wolfram Language. (2012). GetEnvironment. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GetEnvironment.html
BibTeX
@misc{reference.wolfram_2025_getenvironment, author="Wolfram Research", title="{GetEnvironment}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/GetEnvironment.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_getenvironment, organization={Wolfram Research}, title={GetEnvironment}, year={2012}, url={https://reference.wolfram.com/language/ref/GetEnvironment.html}, note=[Accessed: 13-August-2025]}