Wolfram Computation Meets Knowledge

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:

Running the Installer from a Downloaded Script

  1. Quit any previous installations of Wolfram products that are running on your machine.
  2. Go to the Mathematica product page in your User Portal.
  3. Click the Linux link in the “Mathematica + Documentation” line and “Direct File Download” column. This downloads the Mathematica installer along with its documentation.
  4. Wait for the download to finish.

  5. Installing Mathematica + Documentation

    1. 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 
    2. 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:
    3. 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:
    4. 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):
      
    5. 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)
    6. To install wolframscript, type “y”; otherwise, type “n”.

    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

    1. Quit any previous installation of Wolfram products running on your machine.
    2. Mount the DVD or USB drive and change the directory to the mount point. Then change the directory to Unix/Installer.
    3. 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.

    4. The installer prompts you to enter an installation directory.
      Enter the installation directory, or press ENTER
      to select /usr/local/Wolfram/Mathematica/13.2:
    5. 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:
    6. 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)
    7. To install wolframscript, type “y”; otherwise, type “n”.

    The installation is now complete. Next, activate Mathematica or sign in using your organization’s credentials to start using it.

Is this article helpful?
Yes
No

Any comments?

Thank you for your feedback.

Submit

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