GetEnvironment

WMA link


GetEnvironment["var"]

gives the setting corresponding to the variable “var” in the operating system environment.

GetEnvironment[{"$var_1$“, ”$var_2$", ...}]

gives a list rules for each of the environment variables listed.

GetEnvironment[]

gives a list rules for all environment variables.

On POSIX systems, the following gets the users HOME directory:

We can get both the HOME directory and the user name in one go:

Arguments however must be strings:

See also Environment and SetEnvironment.

Environment
MathicsVersion