How to download and use matlab in ubuntu instance?


Hi, I was trying to download and activate matlab in aws ubuntu instance for my project. However, I couldn't get any guide to install matlab in ubuntu instance.

Until now, I made ubuntu instance successfully and downloaded matlab installation file, but I couldn't get matlab exe file.

As I thought, I need ubuntu GUI to activate matlab exe file. so I tried to use VNC but I still don't know how to use it.

Can you help me to make matlab environment in aws ubuntu instance?

asked 2 years ago637 views
2 Answers


Matlab installation instructions are available at The standard install is administered through the GUI which is where your problem seems to be. There is also the option of a non-interactive install, (see halfway down the page referenced above) using:

./install -mode silent -agreeToLicense yes

which would be worth a try.

If you need need the GUI, does it have to be Ubuntu? There is an official guide from AWS on how to install and connect to the GUI on AWS Linux: Note the alternative options at the top of the guide which might be more effective for you.

If Ubuntu is a hard requirement, there is an unofficial, older guide here which still appears relevant. This coupled with the matlab install guide should answer your question.

The matlab-on-aws project might also be of interest. It provides a CloudFormation stack which will install matlab for you.

Note that I don't have a matlab license so this answer is based on documentation rather than proven on my machine. Hope it helps.

answered 2 years ago

Hello Kwon,

I understand that you are trying to download and activate MATLAB in your AWS instance and you cannot seem to get the MATLAB exe file.

In order to activate MATLAB on your instance, please follow the steps mentioned below:

  1. Login to your instance through a virtualization platform i.e Virtual Box
  2. Locate your Matlab zip file and unzip using the command:
  • sudo unzip -X -K <name of downloaded file> -d matlab_2022_installer
  • Please note that matlab_2022_installer is the name of the file you are creating
  1. List all the files and locate matlab_2022_installer. Get into that folder using: cd matlab_2022_installer
  2. Use the command sudo su (this command will take you to root) and enter your password if required.
  3. On root, run the following command:
  • xhost +SI:localuser:root
  • The above command should show "localuser:root being added to access control list"
  1. List all the files in the folder using ls, locate "install"
  • Install file is the executable file
  1. Run the following command to run the executable file:
  • sudo ./install
  1. By now you should be able to login to your Matlab account using your credentials and complete the installation.
  2. Exit root by typing the command: cd and go to user local using the command: cd /usr/local 
  3. Find the Matlab folder, enter, and list all the files to locate your Matlab version and get into the folder.
  4. Enter the bin folder and list all the files to see the activate matlab script and run the script using the command: ./
  5. After activation, open a new terminal and run the command: matlab  - This command will run matlab

I hope this helps.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions