$InstallationDirectory

gives the top‐level directory in which your Wolfram System installation resides.
Details

- $InstallationDirectory returns the full name of the directory as a string.
- Typical values are:
-
C:\Program␣Files\Wolfram␣Research\Wolfram\{RelatedLinks-EIWL.png} Windows /Applications/Wolfram.app/Contents macOS /usr/local/Wolfram/Wolfram/{RelatedLinks-EIWL.png} Linux
Examples
Wolfram Research (2003), $InstallationDirectory, Wolfram Language function, https://reference.wolfram.com/language/ref/$InstallationDirectory.html (updated 2024).
Text
Wolfram Research (2003), $InstallationDirectory, Wolfram Language function, https://reference.wolfram.com/language/ref/$InstallationDirectory.html (updated 2024).
CMS
Wolfram Language. 2003. "$InstallationDirectory." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/$InstallationDirectory.html.
APA
Wolfram Language. (2003). $InstallationDirectory. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$InstallationDirectory.html