How do I set up Mathematica on Linux?
Read this article in: Deutsch, Español, Français, 日本語, 한국어, Português, Русский, 中文
If your organization has enabled access to Wolfram products through single sign-on (SSO), see How do I activate a Wolfram product using single sign-on (SSO)?
To set up Mathematica on your Linux machine, you first need to download Mathematica and its documentation from the Wolfram User Portal, install both on your machine, then activate Mathematica or sign in using your organization’s credentials.
Note:
- You may choose to install Mathematica without its documentation. Any documentation search in your Mathematica installation then redirects to the online Wolfram Language & System Documentation Center and requires an active internet connection.
- The Mathematica installer for Linux is a bash script that is run in the Linux terminal. If you’re not familiar with the terminal, please read a brief guide on how to use the terminal. The setup is an easy-to-follow dialog. Please follow the corresponding instructions for installing from a downloaded script or from a DVD or USB drive.
Running the Installer from a Downloaded Script
- Quit any previous installations of Wolfram products that are running on your machine.
- Go to the Mathematica product page in your User Portal.
- Click the Linux link in the “Mathematica + Documentation” line and “Direct File Download” column. This downloads the Mathematica installer along with its documentation.
- Wait for the download to finish.
- Open a terminal and change the directory to where the Mathematica + Documentation installer is located. For example, if the installer is located on your desktop, run:
cd Desktop
- Installing Mathematica and Wolfram Language Documentation under its default location typically require administrative privileges.
Use the command sudo to run the installer script in that case. For example, if the installer is called “MathematicaAndDocumentationInstaller.sh”, run:sudo bash MathematicaAndDocumentationInstaller.sh
sudo asks you to enter your password on the machine. After providing it, the installation starts.
sudo can be omitted when installing to a location for which you have the necessary write permissions.The installer prompts you to enter an installation directory.
Enter the installation directory, or press ENTER to select /usr/local/Wolfram/Mathematica/13.2:
- Press Enter to install Mathematica to the default directory.
Otherwise, type the full file path to your desired installation directory and press Enter.
The installer prompts you to choose where you want to place the executables.
Type the directory path in which Wolfram Mathematica script(s) will be created, or press ENTER to select /usr/local/bin:
- Press Enter to place them in the default directory.
Otherwise, if you want to place them elsewhere, type in the full file path and then press Enter.
The installer may ask you to choose if you want to overwrite or rename a previously existing installation of Mathematica + Documentation. At this step, you can also choose to cancel your installation.
(1) Overwrite (2) Rename (3) Cancel Type your selection, or press ENTER to select (1):
- Press Enter to overwrite the previous installation.
Otherwise, if you want to retain your older installation, type “2”.
The installer then asks if you want to install wolframscript, an optional add-on to execute Wolfram Language code to be run from the command line or by using a script.
WolframScript allows Wolfram Language code to be run from the command line and from self-executing script files. It is always available from /usr/local/Wolfram/Mathematica/13.2/Executables/wolframscript. WolframScript system integration makes the wolframscript binary accessible from any terminal, and allows .wls script files to be executed by double-clicking them in the file manager. Install WolframScript system integration? (y/n)
- To install wolframscript, type “y”; otherwise, type “n”.
- Quit any previous installation of Wolfram products running on your machine.
- Mount the DVD or USB drive and change the directory to the mount point. Then change the directory to Unix/Installer.
- Installing Mathematica under its default locations typically requires administrative privileges. Type:
sudo ./MathInstaller
to run the installer from the DVD or USB drive.
sudo
can be omitted when installing to a location for which you have the necessary write permissions. - The installer prompts you to enter an installation directory.
Enter the installation directory, or press ENTER to select /usr/local/Wolfram/Mathematica/13.2:
- Press Enter to install Mathematica to the default directory.
Otherwise, type the full file path to your desired installation directory and press Enter.
The installer prompts you where you want to place the executables.
Type the directory path in which Wolfram Mathematica script(s) will be created, or press ENTER to select /usr/local/bin:
- Press Enter to place them in the default directory.
Otherwise, if you want to place them elsewhere, type in the full file path and then press Enter.
The installer then asks if you want to install wolframscript, an optional add-on to execute Wolfram Language code to be run from the command line or by using a script.
WolframScript allows Wolfram Language code to be run from the command line and from self-executing script files. It is always available from /usr/local/Wolfram/Mathematica/13.2/Executables/wolframscript. WolframScript system integration makes the wolframscript binary accessible from any terminal, and allows .wls script files to be executed by double-clicking them in the file manager. Install WolframScript system integration? (y/n)
- To install wolframscript, type “y”; otherwise, type “n”.
Installing Mathematica + Documentation
The installation is now complete. Next, activate Mathematica or sign in using your organization’s credentials to start using it.
Running the Installer from a DVD or USB Drive
The installation is now complete. Next, activate Mathematica or sign in using your organization’s credentials to start using it.
Contact Support
Whether you have a question about billing, activation or something more technical, we are ready to help you.
1-800-WOLFRAM (+1-217-398-0700 for international callers)
Customer Support
Monday–Friday
8am–5pm US Central Time
- Product registration or activation
- Pre-sales information and ordering
- Help with installation and first launch
Advanced Technical Support (for eligible customers)
Monday–Thursday
8am–5pm US Central Time
Friday
8:30–10am & 11am–5pm US Central Time
- Priority technical support
- Product assistance from Wolfram experts
- Help with Wolfram Language programming
- Advanced installation support