Install Matlab in Ubuntu Linux

Related: Put links to Matlab in desktop menu

This procedure works for Matlab (regular and student) on Ubuntu and similar Linux operating systems.

  1. Login to Mathworks, downloading the Matlab installer
  2. extract all files from this downloaded archive, and run (without sudo)


    install under /home/username/.local/ since it’s tied to your Linux username anyway. 3. install Symbolic Links to /home/username/.local/bin when asked by the GUI at the end of the install. 4. add to ~/.bashrc:

    export PATH=$PATH:$HOME/.local/bin

    close and reopen Terminal

  3. (optional) add links in your desktop menu

Matlab can be started from Terminal:


If you want the fastest performance and least memory by disabling the Java graphics system (no visible plots)

matlab -nojvm

Non-interactive jobs (for example, CI) should be run like

matlab -batch myscript

GUI required for normal install

If installing Matlab remotely over SSH, you must any one of:

Otherwise, you’ll get


Error: Installation cannot proceed. You may either:

  1. Set an X11 display, and restart the install process

  2. Use the silent install feature by specifying the -mode silent option