$BaseDirectory

$BaseDirectory

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

Details

  • $BaseDirectory returns the full name of the directory as a string.
  • Typical values are:
  • C:\ProgramData\MathematicaWindows
    /Library/MathematicamacOS
    /usr/share/MathematicaLinux
  • 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.

Examples

Basic Examples  (2)

The base directory in which systemwide files are placed:

Subdirectories and files of $BaseDirectory:

Wolfram Research (2003), $BaseDirectory, Wolfram Language function, https://reference.wolfram.com/language/ref/$BaseDirectory.html.

Text

Wolfram Research (2003), $BaseDirectory, Wolfram Language function, https://reference.wolfram.com/language/ref/$BaseDirectory.html.

CMS

Wolfram Language. 2003. "$BaseDirectory." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$BaseDirectory.html.

APA

Wolfram Language. (2003). $BaseDirectory. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$BaseDirectory.html

BibTeX

@misc{reference.wolfram_2023_$basedirectory, author="Wolfram Research", title="{$BaseDirectory}", year="2003", howpublished="\url{https://reference.wolfram.com/language/ref/$BaseDirectory.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_$basedirectory, organization={Wolfram Research}, title={$BaseDirectory}, year={2003}, url={https://reference.wolfram.com/language/ref/$BaseDirectory.html}, note=[Accessed: 19-March-2024 ]}