Wolfram System File Organization

Wolfram System Distribution Files
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 FilesWolfram ResearchMathematica13.0
Windows
/Applications/Mathematica.app
Macintosh
/usr/local/Wolfram/Mathematica/13.0
Linux
Default locations for the Wolfram System installation directory.
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.
Mathematica
Wolfram System front end
WolframKernel
Wolfram Language kernel, usually with its own text-based interface
wolfram
Wolfram Language kernel to be run in a terminal or shell
mcc
script for preprocessing and compiling WSTP C source files
Typical executable programs accessible from the installation directory.
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.
AddOns
bundled Wolfram System add-ons
Documentation
Wolfram Language documentation
SystemFiles
Wolfram System files
Toplevel subdirectories of the main installation directory.
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/system
kernel binaries or elements for each computer system
Kernel/SystemResources/system
system-specific .mx files used by the kernel
Kernel/TextResources
message and text files used by the kernel
FrontEnd/Binaries/system
front end binaries or elements for each computer system
FrontEnd/SystemResources
files used by the front end in each window system environment
FrontEnd/TextResources
message and text files used by the front end
FrontEnd/StyleSheets
default notebook stylesheets
FrontEnd/Palettes
default palette notebooks
Libraries/system
WSTP and other libraries used by the kernel and front end
Links
developer kits for WSTP and other connection technologies
Fonts
Wolfram System fonts, often copied to a central directory
CharacterEncodings
specifications of character encodings
SpellingDictionaries
spelling dictionaries
SystemDocumentation/env
Linux man pages and other environment-specific documentation
Graphics/Binaries/system
PostScript interpreters and graphics programs
Graphics/SystemResources
PostScript definitions and other resources for graphics
Graphics/Packages
packages for setting up graphics
Typical subdirectories of the SystemFiles directory, part one.
Installation
various auxiliary programs used in installation, called automatically by the main installer program
IncludeFiles
files for inclusion in other programs
Java
files for the Java Runtime Environment (if needed)
Typical subdirectories of the SystemFiles directory, part two.
Files of information to be displayed by the Wolfram System Help Viewer are installed separately and in a different location on most platforms.
C:\Users\username\AppData\Local\Programs\Common\Wolfram Research\Documentation.en-us\13.0\Documentation
Windows
/Library/Wolfram/Documentation/13.0/en-us
Macintosh
/usr/local/Wolfram/Mathematica/13.0/Documentation
Linux
Default locations for the Wolfram documentation installation directory.
System/Guides
pages that categorize and link to related functions
System/ReferencePages/Symbols
reference pages for each of the Wolfram System's built-in objects
System/ReferencePages/Formats
reference pages for file formats that the Wolfram System handles
Packages/name/Guides, etc.
documentation for add-on items
Typical subdirectories of the Documentation directory.
Loadable Files
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 userspecific base directories.
$BaseDirectory
systemwide base directory for files to be loaded by the Wolfram System
$UserBaseDirectory
user-specific base directory for files to be loaded by the Wolfram System
Base directories for files to be loaded by the Wolfram System.
C:ProgramDataMathematica
Windows
/Library/Mathematica
Macintosh
/usr/share/Mathematica
Linux
Typical values of $BaseDirectory.
C:UsersusernameAppData\RoamingMathematica
Windows
~/Library/Mathematica
Macintosh
~/.Mathematica
Linux
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".
Applications
Wolfram Language application packages
Autoload
packages to be autoloaded on startup
FrontEnd
front end initialization files
Kernel
kernel initialization files
Licensing
license management files
SystemFiles
general system files
Typical subdirectories of Wolfram System base directories.
Some files in base directories serve as configuration files, automatically used by the Wolfram Language kernel or front end.
Kernel/init.m
run when the kernel is started
Kernel/end.m
run when the kernel is terminated
FrontEnd/init.m
read when the front end is started
SystemFiles/FrontEnd/StyleSheets/
customized notebook stylesheets
SystemFiles/FrontEnd/Palettes/
additional palettes to appear in the front end menu
Some typical kernel and front end configuration files.
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".
Applications/name/
named add-on applications
Autoload/name/
add-ons to be loaded automatically when the Wolfram System is started
Subdirectories under $BaseDirectory and $UserBaseDirectory.
With the default setting for the kernel $Path variable, an addon can be loaded from within a Wolfram System session simply by using the command <<name`. This will load the init.m file for the addon, which should in turn be set up to load other necessary files or packages.
By placing an addon under the Autoload subdirectory of $BaseDirectory or $UserBaseDirectory, you can have the Wolfram System automatically load the addon whenever you start the kernel or the front end.
Kernel/init.m
an initialization file to be loaded by the kernel
FrontEnd/init.m
an initialization file to be loaded by the front end
Documentation/
documentation to be found by the front end
Typical possible contents of the directory for an addon.