MATLAB: What are symbolic links, and why does the MATLAB installer ask if I want to create them

MATLABunix

I would like to know what symbolic links are, and the MATLAB installer asks if I want to create them.

Best Answer

In the Unix architecture, symbolic links point to another file / script / program, such as a shortcut does in the Windows architecture. The reason the MATLAB installer offers to install them is because the /bin and /usr/bin directories are in the system path, while the MATLAB directory is not.
The /bin and /usr/bin directories contain common system programs, as well as links to other programs, so if you type a command such as 'ifconfig' from anywhere, it will check those directories (and others in the path) first.
This is convenient for starting MATLAB from any directory; if the links are installed, you do not have to change to the MATLAB directory in order to start MATLAB. Keep in mind you need to be running the installer as 'root' to install the symbolic links.
In order to manually create the symbolic link, browse to the /usr/local/bin/ folder and run the following command:
ln -s $MATLAB/bin/matlab matlab
where $MATLAB is the MATLAB installation directory.
Related Question