How to install Matlab without GUI

If you want to install Matlab in a server, probably you don't have a GUI.

To run the installer you need previosly configurate silent mode:

./install -mode silent
Preparing installation files ...
Installing ...
(Nov 03, 2016 10:53:02) ##################################################################
(Nov 03, 2016 10:53:02)
(Nov 03, 2016 10:53:03) When running the installer with an input file, you must accept the license agreement by setting the agreeToLicense option to yes.
(Nov 03, 2016 10:53:03) Exiting with status -2
(Nov 03, 2016 10:53:07) End - Unsuccessful.

The previous error is because we need configurate all options, like if you are agree with the license agreement, enter the licence key, etc.
To do this, you need to edit installer_input.txt and activate.ini files:

In activate.ini these are the lines that you need configurate:


In installer_input.txt these are:


Now, execute the installer with installer_input options:

./install -inputFile ~/installer_input.txt

At the end of the instalation you will see the following message:

MATLAB Compiler SDK 6.2 requires the following: 

?  a supported compiler for creation of C and C++ Shared libraries
?  a Java JDK for creation of Java packages

(Nov 03, 2016 11:15:54) Exiting with status 0
(Nov 03, 2016 11:15:56) End - Successful.

To avoid problems, is better install them:

apt-get install gcc build-essential openjdk-7-jdk

Now, to activate matlab, if you run you will see the following error:

Error: Activation cannot proceed. You may either:
1. Set an X11 display, and restart the activation process
2. Use the silent activation feature

3. Activate using the license center

To solve it, you must use activation.ini file as parameter:

./ -propertiesFile ~/activate.ini 
Silent activation succeeded.

To run matlab, now you need run it wihout interface:

matlab -nodesktop -nojvm -nosplash
#or matlab -nodisplay

If you want run matlab easily, you can add to your ~/.bashrc file the following lines:

alias matlab='matlab -nodisplay'

If you need remove matlab form your computer, just run these:

rm -rf /usr/local/R2016
rm ~/.matlab
rm /usr/local/bin/matlab /usr/local/bin/mcc /usr/local/bin/mex /usr/local/bin/mbuild

After that, check for any matlab files with:

locate matlab

Enjoy it!


  1. Excellent and very cool idea and the subject at the top of magnificence and I am happy to this post..Interesting post! Thanks for writing it.What's wrong with this kind of post exactly? It follows your previous guideline for post length as well as clarity
    Matlab Training in Chennai

  2. Didn't work for me. On activation it says "Silent activation succeeded.", but when I execute "matlab -nodesktop -nojvm -nosplash" it returns:

    Error: Activation cannot proceed. You may either:
    1. Set an X11 display, and restart the activation process
    2. Use the silent activation feature
    3. Activate using the license center

  3. Much thanks ! This post helped me lots.
    Btw, I was trying to install matlab in a docker container.

  4. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Devops training in tambaram|Devops training in velachery|Devops training in annanagar|Devops training in sholinganallur

  5. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
    java training in chennai | java training in bangalore

    java interview questions and answers | core java interview questions and answers

  6. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
    advanced excel training in bangalore

  7. Hi,
    Good job & thank you very much for the new information, i learned something new. Very well written. It was sooo good to read and usefull to improve knowledge. Who want to learn this information most helpful. One who wanted to learn this technology IT employees will always suggest you take python training in bangalore. Because Python course in Bangalore is one of the best that one can do while choosing the course.


Post a Comment

Popular posts from this blog

from: can't read /var/mail/ in Python scripts

How to fix Android when developer options are not available for this user

How to fix VirtualBox error when you try to import an ova file