This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / System Parameters  /
Environment

  • Environment[" var "] gives the value of an operating system environment variable.
  • The values of environment variables are returned by Environment as strings.
  • Environment returns $Failed if it cannot find a value for the operating system variable you requested.
  • The behavior of Environment depends on the computer system you are using.
  • See the Mathematica book: Section 2.13.5.
  • See also: Run, $CommandLine, $System.