Wolfram Computation Meets Knowledge

How do I install Mathematica on Linux?

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


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

  1. Quit any previous installation of Wolfram products running on your machine.
  2. Open a terminal and change the directory to where the installer is located. For example, if the installer is located on your desktop, run:
     cd Desktop 

    This changes the directory to your desktop. If you wish to verify that the installer file is in your desktop, use the command ls.

  3. The installer needs administrative privileges to run. Use the command sudo to run the installer script. For example, if the installer is called “installer.sh”, run:
    sudo bash installer.sh

    sudo asks you to enter the administrative password on the machine. After providing the administrative password, the installer starts.

  4. The first step in the installer prompts you to enter an installation directory. Press Enter to install Mathematica to the default directory.
    Enter the installation directory, or press ENTER
    to select /usr/local/Wolfram/Mathematica/12.1:

    Otherwise, if you know where you want to install the software, type the full file path to your desired installation directory and press Enter.

    The installer then copies the files to the installation directory.

  5. After the files are copied, you are prompted to type where you want to place the executables. To place them in the default directory, press Enter.
    Type the directory path in which Mathematica
    scripts will be created, or press ENTER to select
    /usr/local/bin:

    Otherwise, if you want to place them elsewhere, type in the full file path and then press Enter.

    The installer then copies the executables to the desired directory.

  6. The installer then asks if you want to install WolframScript, an optional add-on to execute Wolfram Language code from the command line or by using a script. To install WolframScript, type “y”; otherwise, type “n”.
    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/12.1/Executables/wolframscript. 
    WolframScript system integration makes the wolframscript binary
    accessiblefrom 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. The installer then asks which users on your system you would like to give access to VernierLink. We recommend selecting “n” unless any other users of your system will need to connect to Vernier devices. Note that these permissions can only be granted if you are installing as a superuser.
    VernierLink provides the ability to control sensors and instruments by Vernier Software & Technology using the Wolfram Language.
    
    Users must have read and write permissions to the devices for this functionality to work. It is possible to configure this computer so that all users have read and write permissions for Vernier devices. If you do not have any Vernier devices, or if you wish to control device permissions yourself, it is safe to answer "no" to this question.
    
    Configure computer so that Vernier devices are writable by all users? (y/n)

The installation is now complete. Next, activate the software 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. Type:
    ./MathInstaller

    to run the installer from the DVD or USB drive.

  4. The first step in the installer prompts you to enter an installation directory. Press Enter to install Mathematica to the default directory.
    Enter the installation directory, or press ENTER
    to select /usr/local/Wolfram/Mathematica/12.1:

    Otherwise, if you know where you want to install the software, type the full file path to your desired installation directory and press Enter.

    The installer then copies the files to the installation directory.

  5. After the files are copied, you are prompted to type where you want to place the executables. To place them in the default directory, press Enter.
    Type the directory path in which the scripts will be created,
    or press ENTER to select /usr/local/bin:

    Otherwise, if you want to place them elsewhere, type in the full file path and then press Enter.

    The installer then copies the executables to the desired directory.

  6. The installer then asks if you want to install WolframScript, an optional add-on to execute Wolfram Language code from the command line or by using a script. To install WolframScript, type “y”; otherwise, type “n”.
    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/12.1/Executables/wolframscript. 
    WolframScript system integration makes the wolframscript binary
    accessiblefrom 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. The installer then asks which users on your system you would like to give access to VernierLink. We recommend selecting “n” unless any other users of your system will need to connect to Vernier devices. Note that these permissions can only be granted if you are installing as a superuser.
    VernierLink provides the ability to control sensors and instruments by Vernier Software & Technology using the Wolfram Language.
    
    Users must have read and write permissions to the devices for this functionality to work. It is possible to configure this computer so that all users have read and write permissions for Vernier devices. If you do not have any Vernier devices, or if you wish to control device permissions yourself, it is safe to answer "no" to this question.
    
    Configure computer so that Vernier devices are writable by all users? (y/n)

The installation is now complete. Next, activate the software 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–7pm 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