$UserBaseDirectory

$UserBaseDirectory

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

Details

  • $UserBaseDirectory returns the full name of the directory as a string.
  • Typical values are:
  • C:\User\username\AppData\Roaming\WolframWindows
    ~/Library/WolframmacOS
    ~/.WolframLinux
  • The value of $UserBaseDirectory can be specified by setting the operating system environment variable when the Wolfram Language kernel is launched. It cannot be reset from inside the kernel.
  • Typical subdirectories of $UserBaseDirectory 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 by a given user.
  • Appropriate subdirectories are automatically included on $Path.
  • The subdirectories of $UserBaseDirectory are given in $Path before the corresponding subdirectories of $BaseDirectory.

Examples

Basic Examples  (2)

The base directory in which user-specific files are placed:

Subdirectories and files of $UserBaseDirectory:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2024_$userbasedirectory, author="Wolfram Research", title="{$UserBaseDirectory}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/$UserBaseDirectory.html}", note=[Accessed: 23-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_$userbasedirectory, organization={Wolfram Research}, title={$UserBaseDirectory}, year={2024}, url={https://reference.wolfram.com/language/ref/$UserBaseDirectory.html}, note=[Accessed: 23-November-2024 ]}