MATLAB or Matrix Laboratory is a programming and numeric computing platform used by millions of engineers and scientists to analyze data, develop algorithms, and create models. It is a staple for any sort of numerical or mathematical programming. In this article, we will learn how to install and use MATLAB on Linux.
Step 1. Obtain MATLAB license
Since MATLAB is proprietary software, we need a license to use it. You can obtain a license from MathWorks Store. MATLAB by default offers four types of licenses. Standard, Education, Student, and Home. Mathworks also offers a free 30-day trial license which I will be installed in this tutorial.
To obtain the trial license, enter your university or organisation’s email ID here.
After you enter your Email ID, A verification email will be sent to your inbox which requires you to enter your details and how you plan to use the product. Regardless of the license you choose, after verification is completed, you will be greeted with the MATLAB Dashboard where you can download the software.
Step 2. Downloading MATLAB
To download MATLAB, click the “Install MATLAB on your computer” and then “Download for Linux”.
This will download a zip file that contains your MATLAB software.
Step 3. Install MATLAB
To install MATLAB, we must first unzip the downloaded folder. However, before unzipping, we will first make a separate folder, in which we can unzip the downloaded folder. Here I am naming that folder “matlab” but you can name it anything.
To do that execute the following in the terminal.
mkdir matlab unzip matlab_R2022a_glnxa64.zip -d matlab
You can replace
matlab_R2022a_glnxa64.zip with the name of your downloaded folder.
Now go to the folder in which you unzipped all the files and execute the install script.
cd matlab ./install
This will prompt an installation wizard asking you to log in.
After entering the email and password, you will be asked to select your license, select the destination folder, the products you want to install, and whether you want to create symbolic links in the root directory.
Note: It is possible that you don’t have sudo privileges, in which case, the installer will refuse to select /usr/local/ as the destination folder. In that case, you choose /home/ as your destination folder and so no to creating symbolic links.
After everything is done, it will install the product.
Step 4. Launch MATLAB
If you made symbolic links during the installation, you can launch Matlab by simply typing
matlab in terminal.
If you cannot make symbolic links, then all the launch scripts are placed in the /bin/ folder where you installed MATLAB.
To launch MATLAB. Go to the bin folder of the destination directory and execute the following.
You may not want to browse to this folder and execute .matlab every time you have to start MATLAB. In that case, you can make an alias (like the one shown below) and add it to
Finally, you have installed MATLAB and can start working on it.
In this article, we learned how to download, install and set up MATLAB, a product of Mathworks. Now you can start using MATLAB for your modeling projects without ever switching to Mac or Windows. Keep exploring!