Wolfram System File Organization
A full Wolfram System installation consists of thousands of separate files, arranged in several hundred directories under the main installation directory. The location of the main installation directory is determined at install time. From within a Wolfram Language kernel, its name is given by the value of $InstallationDirectory.
C:∖Program Files∖Wolfram Research∖Mathematica∖13.0
The executable programs that launch the Wolfram System are typically in the main installation directory. Sometimes there may also be links to them, or scripts accessing them, in other locations. From within a Wolfram Language kernel, First[$CommandLine] gives the full name of the executable program corresponding to that kernel.
Wolfram System front end
Wolfram Language kernel, usually with its own text-based interface
Wolfram Language kernel to be run in a terminal or shell
script for preprocessing and compiling WSTP C source files
The main installation directory has three standard subdirectories that contain material distributed with the Wolfram System. Under normal circumstances, none of the contents of these directories should ever be modified, except, for example, if you choose to edit a shared stylesheet.
bundled Wolfram System add-ons
Wolfram Language documentation
Wolfram System files
Particularly on Linux systems, the Wolfram System often has executable files for different computer architectures and systems stored in a single overall directory structure. Each system is in a subdirectory with a name given by $SystemID. Some resource directories may also contain files specific both to particular languages and particular computing environments. These files are given in subdirectories such as Japanese/Windows.
kernel binaries or elements for each computer system
system-specific .mx files used by the kernel
message and text files used by the kernel
front end binaries or elements for each computer system
files used by the front end in each window system environment
message and text files used by the front end
default notebook stylesheets
default palette notebooks
WSTP and other libraries used by the kernel and front end
developer kits for WSTP and other connection technologies
Wolfram System fonts, often copied to a central directory
specifications of character encodings
Linux man pages and other environment-specific documentation
PostScript interpreters and graphics programs
PostScript definitions and other resources for graphics
packages for setting up graphics
various auxiliary programs used in installation, called automatically by the main installer program
files for inclusion in other programs
files for the Java Runtime Environment (if needed)
Files of information to be displayed by the Wolfram System Help Viewer are installed separately and in a different location on most platforms.
pages that categorize and link to related functions
reference pages for each of the Wolfram System's built-in objects
reference pages for file formats that the Wolfram System handles
documentation for add-on items
You can customize your Wolfram System by adding files that can be loaded into the system under different circumstances. Such files are conventionally placed in either systemwide or user‐specific base directories.
systemwide base directory for files to be loaded by the Wolfram System
user-specific base directory for files to be loaded by the Wolfram System
Typical values of $BaseDirectory.
Typical values of $UserBaseDirectory.
You can specify different locations for these directories by setting operating system environment variables when you launch the Wolfram System, as discussed in "Wolfram System Sessions".
Wolfram Language application packages
packages to be autoloaded on startup
front end initialization files
kernel initialization files
license management files
general system files
Some files in base directories serve as configuration files, automatically used by the Wolfram Language kernel or front end.
run when the kernel is started
run when the kernel is terminated
read when the front end is started
customized notebook stylesheets
additional palettes to appear in the front end menu
Kernel configuration files can contain any Wolfram Language commands. These commands can test global variables such as $SystemID and $MachineName to determine what operations to perform. Front end configuration files can contain only certain special commands, as described in "Input Syntax".
named add-on applications
add-ons to be loaded automatically when the Wolfram System is started
With the default setting for the kernel $Path variable, an add‐on can be loaded from within a Wolfram System session simply by using the command <<name`. This will load the init.m file for the add‐on, which should in turn be set up to load other necessary files or packages.
By placing an add‐on under the Autoload subdirectory of $BaseDirectory or $UserBaseDirectory, you can have the Wolfram System automatically load the add‐on whenever you start the kernel or the front end.
an initialization file to be loaded by the kernel
an initialization file to be loaded by the front end
documentation to be found by the front end