Install Matlab on Linux

This procedure works for Matlab on most Linux systems including Ubuntu, CentOS and Red Hat.

Extract all files from the Matlab installer archive, and run (without sudo)


Install Matlab under “~/.local/” since Matlab is tied to your Linux username anyway. The user will have problems updating Matlab or installing Addon Toolboxes if you install Matlab outside the user home directory. Install Symbolic Links to “~/.local/bin/” when asked by the GUI.

Add to the user ~/.bashrc:

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

Optional: Add links in your desktop menu

Matlab can be started from Terminal:


It’s best to run non-interactive Matlab jobs (including CI) like

matlab -batch myscript

NOTE: A GUI is required for normal install

If installing Matlab remotely over SSH, use any one of:

If you cannot click the “click here” for individual site license, try dragging the “click here” to the web browser address bar.

If getting error:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Unable to launch the MATLABWindow application

try removing file under the Matlab install folder “bin/glnxa64/” and ./install again.