Instructions for installing Matlab on Linux
Last Update 2020-07-20 by Adam Lu
-
Download the license file from UVA Software (see link from this page) and save it in a secure location (e.g.,
\\128.143.15.11\adamX\Settings_Matlab\Installation\UVA_license.lic
). -
Download the latest version of MATLAB.
-
Extract files and install MATLAB:
-
Extract the files into a directory.
-
Change into that directory and type the command:
sudo ./install
-
Log in to a Mathworks account associated with a UVA email address.
-
Select the UVA’s
Academic - Total Headcount
license. -
Set the installation folder to be
/usr/local/MATLAB/R20XXx
, whereR20XXx
(e.g.R2020a
) is the version number (this should already be the default). -
Select all toolboxes to install by checking the box on the top left corner.
-
Check
Create symbolic links to MATLAB scripts
and keep/usr/local/bin
as the default. -
At the end of installation, activate MATLAB with the saved license file (not with your own Mathworks account).
- If you activated incorrectly, re-activate by running the script
/usr/local/MATLAB/R20XXx/bin/activate_matlab.sh
- If you activated incorrectly, re-activate by running the script
-
-
Activate MATLAB for all other users
-
Option 1:
-
For each user, create the directory
~/.matlab/R20XXx_licenses/
:# If the current user mkdir ~/.matlab/R20XXx_licenses/ # If not the current user mkdir /home/${user}/.matlab/R20XXx_licenses/
-
Copy the license file to the newly created directory:
# Copy the license file cp -p ~/Settings_Matlab/Installation/UVA_license.lic ~/.matlab/R20XXx_licenses/
-
-
Option 2: For MATLAB R2020, apply one of the following commands:
# Set up home directories for all users based on a user's template (e.g., Adam) setup_all_homedirs adam # Set up home directory for a the current user based on a user's template (e.g., Adam) setup_homedirs adam # Set up home directory for a specific user (e.g., Mark) based on a user's template (e.g., Adam) setup_homedirs adam mark # Set up settings files (including the R2020a license file) for the current user based on a user's template (e.g., Adam) setup_dotfiles adam # Set up settings files (including the R2020a license file) for a specific user (e.g., Mark) based on a user's template (e.g., Adam) setup_dotfiles adam mark
-
-
Download the Linux Matlab support tools
-
With this command, Matlab will show up in the start up menu under Development (XFCE)
sudo apt-get install matlab-support
-
Create a desktop icon: Change the modifications of the file
/usr/share/applications/matlab.desktop
to 775, then copy it to the home directoryDesktop
foldercp -p /usr/share/applications/matlab.desktop /home/adam/Desktop
-
-
Exclude extraneous libraries
-
Exclude libraries that interfere with the MATLAB Window application (for the Add-ons Manager, etc.) on Linux
# Change the directory to the library folder cd /usr/local/MATLAB/R2020a/cefclient/sys/os/glnxa64 # Make a subdirectory called 'exclude' sudo mkdir exclude # Move libglib-2.0.so libraries to the 'exclude' folder sudo mv libglib-2.0.so* exclude/
-