Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install MATLAB on Ubuntu

Download the MATLAB installer from MathWorks, run it and add MATLAB to your PATH.

How-To Guides2 min read6 steps13 screenshots
Note: MATLAB needs a MathWorks account and a license (including trial and student licenses).

Step 1: Sign in to MathWorks

Go to the MathWorks website, open the MATLAB page and log in to your account.

Getting MATLAB

Step 2: Choose the installation method

Open the Download page of your license and choose the Linux installer.

The MathWorks account page

Step 3: Provide the extra information

MathWorks may ask you for some details about your use. Fill them in and accept the terms.

The free MATLAB options

Step 4: Download the installer

Download the installer for Linux.

Downloading the Linux installer

Step 5: Unzip it

Go to the folder of the download and unzip the file:

unzip file_name
Unzipping the installer

Step 6: Run the installer

./install
Running the installer

If MATLAB opens a graphical installer, it needs a desktop. On a server without a desktop, use the -inputFile option or X forwarding.

Step 7: Configure the installation

  1. Sign in with your MathWorks account.
    The product installer
  2. Accept the license agreement.
    Choosing the destination folder
  3. Choose the license you want to use.
  4. Choose the destination folder. A common folder is /usr/local/MATLAB/R2024a.
    Selecting the product
  5. Select the products and toolboxes to install.
    The usr/local folder
  6. Confirm your choices and start the install.
    Confirming the selection

Start MATLAB

If the matlab command is not found, add the folder to your PATH:

nano ~/.bashrc

Add (use your own path):

export PATH=$PATH:/usr/local/MATLAB/R2024a/bin
The bash aliases file

Load the change and start MATLAB:

source ~/.bashrc
echo $PATH
matlab
MATLAB R2024a

You can also create a link: sudo ln -s /usr/local/MATLAB/R2024a/bin/matlab /usr/local/bin/matlab.

Tips

  • MATLAB needs several GB of disk space. A full install can take 30 GB or more.
  • Install the libraries it asks for (libgtk, libasound2) if it fails to start.
  • Keep your license active.

Quick recap

  • Download from MathWorks, unzip and run ./install.
  • Install to /usr/local/MATLAB/<release>.
  • Add the bin folder to your PATH.