MATLAB Answers

How do I launch MATLAB on Linux?

3 627 views (last 30 days)
I've completed the installation and activation of MATLAB on a Linux computer. How do I launch the application?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 12 Oct 2018
MATLAB must be launched from the command line on Linux.
If you completed installation as root user, you may have had the option to install symbolic links to MATLAB in a folder on your system path. If you selected to install these links you can launch MATLAB from the command line, regardless of current working directory, by typing the command:
user@host$> matlab
If this does not work, or if you did not install the symbolic links during installation, you must launch MATLAB by specifying the full path to the MATLAB start script:
user@host$> cd $MATLABROOT/bin
where $MATLABROOT is the full path to your MATLAB installation directory, ex:
then launch MATLAB using the following command:
user@host$> ./matlab
See the Documentation for additional information about starting MATLAB on Linux:


Siddharth Kurkure
Siddharth Kurkure on 12 Jul 2018
When I did that, I got ln: failed to create symbolic link '/usr/local/bin/matlab': File exists
Walter Roberson
Walter Roberson on 12 Jul 2018
/usr/local/bin/matlab might already exist on Linux, as Linux has an option to create the symbolic links.
Either way, if it exists, then you might need to update it if it is referring to an older version of MATLAB.
ls -ld /usr/local/bin/matlab
If the output starts with 'd' then it is a directory and should not be removed without further investigation. If it starts with '-' then it is an ordinary file and should not be removed without further investigation. If it starts with 's' then it is a symbolic link, and the ls output will show you want it is currently linked to; in this case to update it
sudo rm /usr/local/bin/matlab
followed by the sudo ln
Benjamin Stadler
Benjamin Stadler on 6 Oct 2018
If you're tiered of typing the entire path each time, you can simply add the matlab bin to your PATH variable as described here:
Note: The bin is located for me (Ubuntu 18.04, default installation) under

Sign in to comment.

More Answers (5)

Mika Mäki
Mika Mäki on 8 May 2019
Edited: Mika Mäki on 8 May 2019
For Ubuntu (and its variants) there is the package matlab-support, which creates a shortcut for MATLAB in the launcher and applies a few bugfixes created by the community. You can install it with
sudo apt install matlab-support
You might also want to have a look at the Matlab page of official Ubuntu documentation and this thread.


Show 5 older comments
Igor on 11 Aug 2020
It worked, thank you! The MATLAB icon is a different color for me on Linux Mint 20, but everything works great now.
Darcy de Asis
Darcy de Asis on 29 Oct 2020
This worked thank you!
David Winthrop
David Winthrop on 4 Nov 2020
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package matlab-support is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'matlab-support' has no installation candidate
Does not work...

Sign in to comment.

Marcos Rogério Fernandes
You can also make a shortcut (at least on Ubuntu) using gnome-panel like that:
sudo apt-get install gnome-panel (only if you don't already has installed)
sudo gnome-desktop-item-edit /usr/share/applications/ --create-new
So, into window that will appear for you, set the properties like below:
And then, will be in your applications menu a icon like that:
That way, you can run the Matlab direct from menu, also can add to dock.


Killian Gaudimont
Killian Gaudimont on 6 Nov 2017
I just downloaded matlab 2017b while there is the 2017a version on my computer (version I do not own the licence). By default the commande "matlab" on the terminal try to open the 2017a version and failed, even after I did what you said.
However if I choose the type "Application" instead of "Application in Terminal" it works great and I thank you.
Do you know what can I do to change the default settings of the commande "matlab" in the terminal though so that I can lauch matlab 2017b instead of 2017a from the terminal?
gorilla3 on 20 Nov 2017
I tried implementing your solutions but it's still not working. What's the full text you input in "command"?
Also, I get this message in the terminal:
Gtk dialog mapped without a transient parent. This is discouraged
Ps. I have ubuntu 16.04 and am trying to run Matlab2017b.

Sign in to comment.

Diamond Fianka
Diamond Fianka on 5 May 2017
thank, it works @ command promt enter matlab


Sign in to comment.

Revanth Bhattaram
Revanth Bhattaram on 29 Mar 2018
Edited: MathWorks Support Team on 5 Apr 2018
Step 1. go to terminal and type : matlab if it don"t work and
Step 2a: user@host$> cd <your installation path>/bin where <your installation path> is your installation directory Step 2b: user@host/<your installation path> /bin $> ./matlab
if it works then you can create a path in bash.bashrc file found in /etc folder open it using gksudo or any other editor as sudo, paste export PATH=$PATH:<your installation path> for example export PATH=$PATH:/usr/local/MATLAB/R2017b/bin/
save and exit. now if you enter matlab in terminal, it should launch.

  1 Comment

RITIKA JAIN on 23 May 2019
Thanks a lot. It worked !!

Sign in to comment.

Michael Levy
Michael Levy on 24 Apr 2018
Edited: Michael Levy on 24 Apr 2018
Apparently, the first thing to do is to type the following 6 letters at the command prompt:


Gerrik Labra
Gerrik Labra on 27 Dec 2020 at 22:39
I tried with the latest verison, of Google linux beta, on google pixel book, but it doesn't show the graphics.
nnuilysis@penguin:~/Matlab$ ./install
terminate called after throwing an instance of 'std::runtime_error'
what(): Unable to launch the MATLABWindow application
Aborted (core dumped)
ennuilysis@penguin:~/Matlab$ matlab
-bash: matlab: command not found
ennuilysis@penguin:~/Matlab$ MATLAB
-bash: MATLAB: command not found
ennuilysis@penguin:~/Matlab$ cd
ennuilysis@penguin:~$ MATLAB
-bash: MATLAB: command not found
ennuilysis@penguin:~$ cd Matlab
ennuilysis@penguin:~/Matlab$ MATLAB
-bash: MATLAB: command not found
ennuilysis@penguin:~/Matlab$ Install
-bash: Install: command not found
ennuilysis@penguin:~/Matlab$ .install
-bash: .install: command not found
ennuilysis@penguin:~/Matlab$ .MATLAB
-bash: .MATLAB: command not found
ennuilysis@penguin:~/Matlab$ ennuilysis@penguin:~/Matlab$ sudo ./install
-bash: ennuilysis@penguin:~/Matlab$: No such file or directory
ennuilysis@penguin:~/Matlab$ No protocol specified
-bash: No: command not found
ennuilysis@penguin:~/Matlab$ terminate called after throwing an instance of '(anonymous namespace)::DisplayError'
-bash: terminate: command not found
ennuilysis@penguin:~/Matlab$ what(): No display available.
-bash: syntax error near unexpected token `:'
ennuilysis@penguin:~/Matlab$ Aborted
Gerrik Labra
Gerrik Labra on 27 Dec 2020 at 22:39
furthermore, I was running MATLAB 2020b

Sign in to comment.



Community Treasure Hunt

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

Start Hunting!