Wolfram Computation Meets Knowledge

How do I set up Mathematica on Linux?

Read this article in: Deutsch, Español, Français, 日本語, 한국어, Português, Русский, 中文


To set up Mathematica on your Linux machine, you first need to download Mathematica. Installers are available in your Wolfram Account. If you cannot find your installers there, please check your Wolfram User Portal on the My Products and Services tab. If you have access to Wolfram products through your organization via single sign-on (SSO), product installers, including documentation, can be found on your organization’s site info page.

The Mathematica installer for Linux is a bash script that runs in the Linux terminal. If you’re not familiar with the terminal, please read a brief guide on how to use it.

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.

Downloading the Mathematica + Documentation Installer from Your Wolfram Account

  1. On the Products & Services tab in your Wolfram Account, select Wolfram Mathematica.

    If you don’t see your products, go to your Wolfram User Portal.

  2. Under Access ► Desktop, click Download to download the combined installer for both the core Mathematica product and the documentation.
  3. Wait for the download to finish.
  4. Next, run the installer.

Downloading the Mathematica + Documentation Installer from Your Wolfram User Portal

  1. Go to the Mathematica product page in the User Portal.

  2. Click the Linux link in the “Mathematica + Documentation” row and “Direct File Download” column. This downloads the combined installer for both the core Mathematica product and the documentation.
  3. Wait for the download to finish.
  4. Next, run the installer.

Running the Installer from a Downloaded Script

  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 in their respective default locations, usr/local/Wolfram/Mathematica/14.0 and usr/share/Wolfram/Documentation/14.0, requires administrative privileges.

    While Mathematica can alternatively be installed in a custom location, the Wolfram Language Documentation can only be installed in the default location. Therefore, use the command sudo to run the installer script in either 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.

    The installer prompts you to enter an installation directory.

    Enter the installation directory, or press ENTER
    to select /usr/local/Wolfram/Mathematica/14.0:
  3. Press Enter to install Mathematica to the default directory.

    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.

    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.
    Type 2 if you want to retain your older installation and rename it.

    Next, the installer 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/14.0/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.

    Now, the Documentation Installer installs the Wolfram Language Documentation to its default location.

    
    --------------------------------------------------------------------
              Wolfram Language 14.0 Documentation 14.0 Installer 
    --------------------------------------------------------------------
    
    Copyright (c) 1988-2023 Wolfram Research, Inc. All rights reserved.
    
    WARNING: Wolfram Language 14.0 Documentation is protected by copyright
    law and international treaties. Unauthorized reproduction or distribution
    may result in severe civil and criminal penalties and will be prosecuted to
    the maximum extent possible under law.
    
    All users of this computer will be able to use this software.
    
    Y
    
    
    Now installing...
    
    [*****************************************************************]
    
    
    
  7. Wait for the Documentation Installer to finish.

The installation is now complete.

Next, activate Mathematica.

Running the Installer from a DVD or USB

  1. Quit any previous installation of Wolfram products running on your machine.
  2. Mount the DVD or USB and change the directory to the mount point. Then change the directory to Unix/Installer.
  3. Installing Mathematica and Wolfram Language Documentation in their respective default locations, usr/local/Wolfram/Mathematica/14.0 and usr/share/Wolfram/Documentation/14.0, requires administrative privileges.

    While Mathematica can alternatively be installed in a custom location, the Wolfram Language Documentation can only be installed in the default location. Therefore, use the command sudo to run the installer from the DVD or USB drive in either case:

    sudo  bash MathematicaAndDocumentationInstaller.sh 
  4. The installer prompts you to enter an installation directory.
    Enter the installation directory, or press ENTER
    to select /usr/local/Wolfram/Mathematica/14.0:
  5. Press Enter to install Mathematica to the default directory.

    The installer prompts you for a location for 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, or type in the full file path for your desired location and then press Enter.

    The installer next 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/14.0/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.

    Now, the Documentation Installer installs the Wolfram Language Documentation to its default location.

    
    --------------------------------------------------------------------
              Wolfram Language 14.0 Documentation 14.0 Installer 
    --------------------------------------------------------------------
    
    Copyright (c) 1988-2023 Wolfram Research, Inc. All rights reserved.
    
    WARNING: Wolfram Language 14.0 Documentation is protected by copyright
    law and international treaties. Unauthorized reproduction or distribution
    may result in severe civil and criminal penalties and will be prosecuted to
    the maximum extent possible under law.
    
    All users of this computer will be able to use this software.
    
    Y
    
    
    Now installing...
    
    [*****************************************************************]
    
    
    
  8. Wait for the Documentation Installer to finish.

The installation is now complete.

Next, activate Mathematica or sign in using your organization’s credentials.

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