How to install MATLAB on Ubuntu 22.04 Jammy Jellyfish Linux

MATLAB is a computing environment and programming language developed by MathWorks. It offers matrix manipulations, plotting of functions and data and more. This article will provide the reader with step by step instructions on how to install Matlab on Ubuntu 22.04 Jammy Jellyfish Linux.

In this tutorial you will learn:

  • How to download MATLAB
  • How to unzip MATLAB installation package
  • How to install MATLAB
  • How to create MATLAB launcher shortcut
  • How to run MATLAB
How to install MATLAB on Ubuntu 22.04 Jammy Jellyfish Linux
How to install MATLAB on Ubuntu 22.04 Jammy Jellyfish Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 22.04 Jammy Jellyfish
Software MATLAB
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to install MATLAB on Ubuntu 22.04 step by step instructions



Twitter icon Follow LinuxConfig.org on Twitter for the latest tips and tricks about Linux!

  1. The first thing we need to do is Head over to the the official Matlab website and download the latest MATLAB installation package.
    Download the Linux package for MATLAB software
    Download the Linux package for MATLAB software
  2. Once ready the MATLAB installation package should be located within your ~/Downloads directory unless you manually selected a different location to download to.
    MATLAB installer file is in our user's Downloads directory
    MATLAB installer file is in our user’s Downloads directory
  3. The next step is to unzip the downloaded MATLAB package. To do so execute the following command from within your Downloads directory. Update the package name where appropriate:
    $ mkdir matlab
    $ unzip -q matlab_R2022a_glnxa64.zip -d matlab
    
    Unzipping the MATLAB installation archive
    Unzipping the MATLAB installation archive
  4. Now we are ready to begin the MATLAB installation. First, create an installation destination directory /usr/local/MATLAB/R2022a/:
    $ sudo mkdir -p /usr/local/MATLAB/R2022a/
    

    Next, navigate to the the matlab directory and begin the installation by execution of the following commands:

    $ cd matlab
    $ sudo ./install
    
  5. At the first prompt you will need to log in with your MATLAB account.

    Log in to proceed with installation
    Log in to proceed with installation



  6. Accept license agreement to proceed.
    Matlab License Agreement
    Matlab License Agreement
  7. Select your license or enter an activation key.
    Select license and click Next
    Select license and click Next
  8. Confirm your user and email are correct and then click Next to proceed.
    Confirm user and email
    Confirm user and email
  9. If you followed this guide from the beginning, leave the default path as the one that has been created for the destination of our Matlab install. That is /usr/local/MATLAB/R2022a/.
    Select installation directory for MATLAB
    Select installation directory for MATLAB
  10. Select which MATLAB products you want to install.
    Select products to install then click Next
    Select products to install then click Next
  11. Select Create symbolic links to MATLAB scripts. Unless you know what you are doing, leave the default /usr/local/bin destination directory in the field.

    Create symbolic link to MATLAB scripts
    Create symbolic link to MATLAB scripts



  12. MATLAB will give you a summary of the installation. Click on “Begin installation” to start it.
    MATLAB installation summary
    MATLAB installation summary
  13. MATLAB installation will likely take a few minutes.
    Matlab installation in progress. Nothing to do. Sit back and wait.
    Matlab installation in progress. Nothing to do. Sit back and wait.
  14. After the installation finishes up, we will create a shortcut launcher for an easy Matlab application start. While still in the terminal execute the following Linux commands:
    
    
  15. Optionally, use a text editor and edit /usr/share/applications/matlab.desktop to reflect your Matlab version number.
    $ sudo nano /usr/share/applications/matlab.desktop
    
    Put the correct MATLAB version for your install
    Put the correct MATLAB version for your install
  16. Search your Activities menu for the matlab keyword. Start Matlab by clicking on its icon.

    Start MATLAB from the Activities menu
    Start MATLAB from the Activities menu



    Twitter icon Follow LinuxConfig.org on Twitter for the latest tips and tricks about Linux!

  17. All done. Matlab installation on Ubuntu 22.04 is completed.
    MATLAB running on Ubuntu 22.04
    MATLAB running on Ubuntu 22.04
  18. All that remains, is to remove the Matlab’s installation file and the temporary directory:
    $ rm ~/Downloads/matlab_R2022a_glnxa64.zip
    $ rm -fr ~/Downloads/matlab
    

Closing Thoughts

In this tutorial, we saw how to install MATLAB on Ubuntu 22.04 Jammy Jellyfish Linux. We also learned how to create a MATLAB shortcut so you can open it easily in the future. Now you can use MATLAB to start a new project or import an existing one.