is a symbol whose value, if any, specifies a list of packages to read with Needs at the start of a Wolfram Language session.
$InitializationContexts
is a symbol whose value, if any, specifies a list of packages to read with Needs at the start of a Wolfram Language session.
Details
- Persistent values of $InitializationContexts are typically set with InitializationValue[$InitializationContexts]={"context1`",…}.
- Values defined in different persistence locations on $PersistencePath are joined with Flatten.
Examples
Basic Examples (1)
Set a package to be read every time the kernel starts:
InitializationValue[$InitializationContexts] = {"MyPackage`"}Set a value that persists only during a front end session:
InitializationValue[$InitializationContexts, "FrontEndSession"] = {"TestPackage`"}View the current initialization value:
InitializationValue[$InitializationContexts]Related Guides
History
Text
Wolfram Research (2017), $InitializationContexts, Wolfram Language function, https://reference.wolfram.com/language/ref/$InitializationContexts.html.
CMS
Wolfram Language. 2017. "$InitializationContexts." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$InitializationContexts.html.
APA
Wolfram Language. (2017). $InitializationContexts. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$InitializationContexts.html
BibTeX
@misc{reference.wolfram_2026_$initializationcontexts, author="Wolfram Research", title="{$InitializationContexts}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/$InitializationContexts.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_$initializationcontexts, organization={Wolfram Research}, title={$InitializationContexts}, year={2017}, url={https://reference.wolfram.com/language/ref/$InitializationContexts.html}, note=[Accessed: 12-June-2026]}