How to Install Matlab on Ubuntu

Ananya Agrawal
2 min readAug 24, 2018

Install Matlab on ubuntu 18.04

Install Matlab on Ubuntu using a college license.

Step 1.

Download Matlab for Linux using the link provided by the college after you make an account on official Matlab website using your college email id.

Step 2.

Open up the terminal and confirm that matlab_R20XXa_glnxa64.zip is located within your ~/Downloads directory:

$ ls ~/Downloads/
matlab_R2018a_glnxa64.zip

Step 3.

Create a destination /usr/local/MATLAB/R2018a/ directory for the Matlab installation.

$ sudo mkdir -p /usr/local/MATLAB/R2018a/

Step 4.

Unzip the Matlab installation package.
Navigate to your ~/Downloads directory and create a new temporary matlab directory to store the content of the matlab_R20XXa_glnxa64.zip file:

$ cd Downloads
$ mkdir matlab

While still in the ~/Downloads directory use the unzip command to extract the content of the matlab_R20XXa_glnxa64.zip file into the previously created ~/Downloads/matlab directory:

$ unzip -q matlab_R2018a_glnxa64.zip -d matlab

The content of the matlab_R20XXa_glnxa64.zip file should now be located within the ~/Downloads/matlab directory.

Step 5.

Start the Matlab installer wizard:

$ cd matlab
$ sudo ./install

Now the download wizard will get started.

Put proxy details in “Connection Settings” if you are behind a proxy server and choose “log in with a MathWorks Account”

Put the credentials used for making an account on the website and then just proceed with default settings till the installation begins.

After installation gets over you will get a prompt asking “login”.
Put your laptop user name on it.

To find your login name:

$whoami

By default the MATLAB installer will create a symbolic link in /usr/local/bin/. This means you should be able to invoke MATLAB by typing “matlab” in the command prompt.

ananya@ananya:~$matlab

If you see an error saying that the command “matlab” was not found, you can launch MATLAB from the MATLAB installation directory. By default this is located here:

/usr/local/MATLAB/R20XXx/bin/matlab

For example, to launch MATLAB R2016b first navigate to the bin directory inside the MATLAB installation directory:

cd /usr/local/MATLAB/R2016b/bin/

Then run Matlab:

./matlab

Thank you for reading. If you like the article give it a clap 👏

ABOUT ME:
I am Ananya Agrawal. I am currently pursuing my B.Tech at IIIT Allahabad. I would really love to talk to you if you are a budding programmer like me so please reach out to me via https://twitter.com/AgrawalAnanyaa.

--

--