Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


gives the base directory in which systemwide files to be loaded by the Wolfram System are conventionally placed.


  • $BaseDirectory returns the full name of the directory as a string.
  • Typical values are:
  • C:\ProgramData\MathematicaWindows
  • The value of $BaseDirectory can be specified by setting the MATHEMATICA_BASE operating system environment variable when the Wolfram Language kernel is launched. It cannot be reset from inside the kernel.
  • Typical subdirectories of $BaseDirectory are:
  • ApplicationsWolfram System application packages
    Autoloadpackages to be autoloaded on startup
    FrontEndfront end initialization files
    Kernelkernel initialization files
    Licensinglicense management files
    SystemFilesgeneral system files
  • These subdirectories are, if possible, created automatically the first time the Wolfram System is run.
  • Appropriate subdirectories are automatically included on $Path.
  • The subdirectories of $BaseDirectory are given in $Path after the corresponding subdirectories of $UserBaseDirectory.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

The base directory in which systemwide files are placed:

Click for copyable input

Subdirectories and files of $BaseDirectory:

Click for copyable input
Click for copyable input
Click for copyable input
Introduced in 2003