MATLAB: Matlab installation in linux ubuntu

linuxMATLAB

i installed matlab R2019b in my ubuntu. the installation process is completed. but when i try to open it through terminal it shows "matlab:command not found"Screenshot from 2019-12-25 09-24-20.png

Best Answer

It's because your MATLAB installation directory is not added in your $PATH. Assuming the MATLAB installation directory is /usr/local/MATLAB/R2019b, you need to add the sub directory "bin".
If you have sudo privilege, create a symbolic link in /usr/local/bin.
sudo ln -s /usr/local/MATLAB/R2019b/bin/matlab /usr/local/bin/matlab
If you don't have sudo privilege, change your PATH environment dynamically.
export PATH=$PATH:/usr/local/MATLAB/R2019b/bin
It might be convinient to add path in your bashrc file.
vi ~/.bashrc
and add the export PATH command written above in bashrc.
Then, save the bashrc and reload.
source ~/.bashrc
Related Question