How do I launch MATLAB on Linux?

2,602 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.
如果你作为根用户完成安装,你妈y 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:
//www.ru-cchi.com/help/matlab/matlab_env/start-matlab-on-linux-platforms.html
16 Comments
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: 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/

Sign in to comment.

More Answers (6)

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
sudoapt 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
Tapadyuti Baral on 15 Oct 2022
Edited:Tapadyuti Baral on 15 Oct 2022
Its work perfectly for me, didnt locate directory automatically but worked!!

Sign in to comment.


Marcos Rogério Fernandes
You can also make a shortcut (at least on Ubuntu) using gnome-panel like that:
sudoapt-get install gnome-panel (only if you don't already has installed)
sudognome-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
Carlos De Castro
Carlos De Castro on 26 Feb 2021
Thank you very much, this worked perfectly, I love you!

Sign in to comment.


Ish Jain
Ish Jain on 7 Apr 2021
为matlab在Ubuntu Linux创建一个快捷方式:
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)
aliasmatlab="/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
sam reswinraj abraham
sam reswinraj abraham on 29 Apr 2022
Thanks! works great

Sign in to comment.


Revanth Bhattaram
Revanth Bhattaram on 29 Mar 2018
Edited:MathWorks Support Team on 5 Apr 2018
步骤1。去终端类型:matlab如果堂"t work and
Step 2a: user@host$> cd /bin where is your installation directory Step 2b: user@host/ /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: 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
Anurag Bhattacharyya
Anurag Bhattacharyya on 2 Nov 2022
Thanks! it works

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:
MATLAB
2 Comments
Gerrik Labra
Gerrik Labra on 27 Dec 2020
Edited:Gerrik Labra on 27 Dec 2020
furthermore, I was running MATLAB 2020b

Sign in to comment.


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

Tags

2022世界杯八强谁会赢?

Community Treasure Hunt

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

Start Hunting!

Baidu
map