How do I launch MATLAB on Linux?
3,808 views (last 30 days)
Show older comments
MathWorks Support Team
on 29 Nov 2010
Commented: Anurag Bhattacharyya
on 2 Nov 2022
I've completed the installation and activation of MATLAB on a Linux computer. How do I launch the application?
Accepted Answer
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:
/usr/local/matlab/R2009b
then launch MATLAB using the following command:
user@host$> ./matlab
See the Documentation for additional information about starting MATLAB on Linux:
https://www.mathworks.com/help/matlab/matlab_env/start-matlab-on-linux-platforms.html
16 Comments
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: https://askubuntu.com/questions/60218/how-to-add-a-directory-to-the-path
Note: The bin is located for me (Ubuntu 18.04, default installation) under
/usr/local/MATLAB/R2018b/bin/
More Answers (6)
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.
17 Comments
Tapadyuti Baral
on 15 Oct 2022
Edited: Tapadyuti Baral
on 15 Oct 2022
Its work perfectly for me, didnt locate directory automatically but worked!!
Marcos Rogério Fernandes
on 1 Nov 2017
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.
4 Comments
Ish Jain
on 7 Apr 2021
To create a shortcut for matlab in Linux Ubuntu:
1. Open bashrc file located in ~/.bashrc in your favourite editer, e.g. vim
$ vim ~/.bashrc
2. Add matlab alias (copy the line towards the end of bashrc file)
alias matlab="/usr/local/MATLAB/R2021a/bin/matlab"
Make sure to use the correct path based on Matlab version
3. Source the bashrc file
$ source ~/.bashrc
4. Now to open matlab, just type on terminal
$ matlab
8 Comments
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.
2 Comments
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:
MATLAB
2 Comments
Gerrik Labra
on 27 Dec 2020
Edited: Gerrik Labra
on 27 Dec 2020
furthermore, I was running MATLAB 2020b
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!