GetEnvironment
["var"]GetEnvironment
[{"$var_1$“, ”$var_2$", ...}]GetEnvironment[]
On POSIX systems, the following gets the users HOME directory:
GetEnvironment["HOME"]
We can get both the HOME directory and the user name in one go:
GetEnvironment[{"HOME", "USER"}]
Arguments however must be strings:
GetEnvironment[HOME]
See also Environment
and SetEnvironment
.