Clear Filters
Clear Filters

Why will MATLAB not start up properly on my Linux machine?

498 views (last 30 days)
MATLAB will not start up on my Linux machine and I am not getting license manager errors.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 17 Jul 2023
Edited: MathWorks Support Team on 17 Jul 2023
If you are having trouble starting MATLAB on a Linux machine and you are not receiving license manager related errors, your start up problems may be resolved by performing the following steps:
Solution #1: Regenerate Preferences
Follow the steps in the article below to remove your preferences directory, so that it can be recreated cleanly:
Solution #2: Move Working Directory
Be sure that there are no files conflicting on your MATLAB path. To verify that your work files and/or startup.m files are not conflicting with this MATLAB installation, perform the following steps:
  1. Move the contents of your ~/Documents/MATLAB folder to another location on your computer.
  2. Start MATLAB again to see if the problem still occurs.
If this resolves the problem, one of your work files is likely conflicting with your MATLAB installation or your startup.m file is crashing MATLAB.
Solution #3: Disable SELinux, AppArmor or Other Security Software:
Try running MATLAB with SELinux disabled. SELinux may prevent MATLAB from starting. To temporarily disable it, run the following command as root:
/usr/sbin/setenforce 0
(/usr/sbin/setenforce 1 will turn SELinux back on)
To disable AppArmor on newer Ubuntu versions, run the below as root:
invoke-rc.d apparmor kill
update-rc.d -f apparmor remove
Once disabled, try MATLAB again. If it works, see the Related Solution at the bottom of the page:
: You may also have to reset the permissions on the folder you are trying to install from. Run the following command to modify the permissions:
chmod -R 755 $installfolder


Solution #4: Debugging Mode
Open MATLAB with the Desktop and Java options Disabled:
1. From the terminal, type the following:
Where $MATLABROOT is the path to your root MATLAB directory)
By default this will be /usr/local/MATLAB/R2022b/bin for R2022b. 
2. Try launching MATLAB with each of the below commands:
matlab -nodesktop
matlab -nojvm
matlab -nodisplay
If MATLAB starts in either of these modes, there is most likely a Java issue. You can check to see if there is a MATLAB_JAVA environment variable that may be changing the JVM that MATLAB is using. If this variable exists, try removing it. 
If MATLAB fails to start in either of these modes, more information may be obtained from the MATLAB crash dump files. These files will be located in your home folder and will have the names:
If any of these files exists, send those files along with the output of the commands above to the Installation and Licensing team using the form at the bottom of this article.
Solution #5: Missing Libraries
MATLAB is tested and fully qualified on Ubuntu, Debian, Red Hat Enterprise Linux (RHEL), and SuSE. However, it will still run on most popular distributions of Linux, provided it is a full desktop installation of the distribution. MATLAB is not supported on minimal or server distributions. A minimal installation may not contain all libraries that MATLAB requires. 
Even if you intend to run MATLAB only in non-graphical mode, MATLAB requires some X11 libraries to run. However, we are not able to specify the X11 requirements down to the exact set of packages required because different distributions may package the libraries differently. MATLAB will work out of the box on desktop installations of any supported distribution. 
See the below for a list of qualified distributions:
Solution #6: Permissions Issues
If MATLAB does not have the correct permissions to certain files and folders, it may not launch or launch correctly. Make sure the user starting MATLAB has access to read and execute files from where MATLAB is installed.
Solution #7: Corrupt Cache
Sometimes, certain files cached when using MATLAB. Try temporarily removing any temporary files or folders before launching MATLAB.

More Answers (0)


Find more on Startup and Shutdown in Help Center and File Exchange


No tags entered yet.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!