How to install MATLAB on Ubuntu 20.04 Focal Fossa 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 20.04 Focal Fossa 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 20.04 Focal Fossa Linux

How to install MATLAB on Ubuntu 20.04 Focal Fossa Linux

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed or upgraded Ubuntu 20.04 Focal Fossa
Software N/A
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 20.04 step by step instructions

  1. download the latest MATLAB installation package

    Head over to the the official Matlab website and download the latest MATLAB installation package.

  2. MATLAB installation package

    Once ready the MATLAB installation package should be located within you Downloads directory.

  3. 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_R2019b_glnxa64.zip -d matlab 
    
    Unzip MATLAB installation package

    Unzip MATLAB installation package

  4. Now we are ready to begin the MATLAB installation. First, create an installation destination directory /usr/local/MATLAB/R2019b/:
    $ sudo mkdir -p /usr/local/MATLAB/R2019b/
    

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

    $ cd matlab
    $ sudo ./install
    


  5. Select which installation method

    Select which installation method you wish to perform. If you do not have File installation Key choose Log in.

  6. Matlab License Agreement

    Matlab License Agreement

  7. Create MathWorks account or provide your existing Login credentials

    Create MathWorks account or provide your existing Login credentials

  8. Select your MathLab License

    Select your MathLab License

  9. destination of our Matlab install

    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/R2019b/



  10. Select products to install.

    Select products to install.

  11. destination directory

    Select Create symbolic links to MATLAB scripts. Unless you know what you are doing, leave the default /usr/local/bin destination directory

  12. Matlab installation summary

    Matlab installation summary

  13. Matlab installation in progress. Nothing to do. Sit back and wait.

    Matlab installation in progress. Nothing to do. Sit back and wait.



  14. Activate your Matlab installation

    Activate your Matlab installation

  15. Continue with the product activation

    Continue with the product activation

  16. Pressing the Next button will activate your Matlab installation

    Pressing the Next button will activate your Matlab installation

  17. This concludes the Matlab installation

    This concludes the Matlab installation

  18. Now, we will create a shortcut launcher for an easy Matlab application start. While still in the terminal execute the following Linux commands:
    $ sudo wget -qO /usr/share/icons/matlab.png http://bit.ly/2SUSFo3
    $ sudo wget -qO /usr/share/applications/matlab.desktop http://bit.ly/2vcomAf
    
    Download desktop launcher and Matlab icon

    Download desktop launcher and Matlab icon

    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
    
    Matlab version number

    Edit launcher with an appropriate Matlab version number

  19. Start Matlab

    Search your Activities menu for the matlab keyword. Start Matlab by clicking on its icon

  20. Matlab is starting

    Matlab is starting

  21. All done. Matlab installation on Ubuntu 20.04 is completed.

    All done. Matlab installation on Ubuntu 20.04 is completed.

  22. All that remains, is to remove the Matlab’s installation file and the temporary directory:
    $ rm ~/Downloads/matlab_R2019b_glnxa64.zip
    $ rm -fr ~/Downloads/matlab
    

    Enjoy!