How to Install Matlab on Ubuntu
These instructions were created for Matlab R2017a on Ubuntu 16.04, but the general instructions should hold for most modern versions of Matlab and Ubuntu.
- Download the Linux installation package. A recent copy is usually available in the ee folder of fs-dept. Alternatively, you can download the file from MathWorks.
- To download the file from fs-dept, open Nautilus (the file browser) and choose File > Connect to Server.
- Enter smb://fs-dept.et.byu.edu/landesk as the server address.
- Connect as a registered user, using your CAEDM credentials.
- The file will be in the packages/ee/Matlab folder and will end with “glnxa64.zip.”
- Double-click the downloaded installation package to extract the files using Archive Manager.
- From a terminal, navigate to the folder containing the extracted files and run:
sudo ./install
- Note: Using sudo is required, or the installer will not be able to create folders for Matlab
- Installation from here is much the same as for Windows:
- Choose “Log in with a MathWorks account, agree to the license, and log in with the department MathWorks account
- Choose “Install” and select the “Concurrent” 284884 license (assuming this is for an on-campus, desktop machine)
- Agree to the default installation folder
- If the installer errors out here with permissions issues, it's because you forgot to invoke sudo with the installer.
- Agree to the default products for installation.
- Provide the location of the license.dat file. It can be downloaded from the same folder on fs-dept that had the installer.
- Check the box to create a symbolic link to the MATLAB scripts in /usr/local/bin.
- This step is different from the Windows installation and is required to allow users to launch Matlab by simply typing “matlab” into a terminal.
- Once the installation is complete, create a desktop entry to make it easier for users to launch Matlab:
- Create a file called matlab.desktop in /usr/share/applications (alternatively, a copy is usually on fs-dept). It should contain the following:
matlab.desktop
[Desktop Entry]
Name=Matlab R2018a
Exec=matlab
Icon=/usr/local/MATLAB/Matlab_Logo.png
Type=Application
Terminal=true
Categories=Developer;
- Copy down the Matlab_Logo.png file from fs-dept (obtained originally from Wikimedia Commons) and place it in the /usr/local/MATLAB/ folder.
- It should now be possible to launch Matlab from the Ubuntu menu, or by typing “matlab” into a terminal.