フィルターのクリア

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

354 ビュー (過去 30 日間)
I would like to know what symbolic links are, and the MATLAB installer asks if I want to create them.

採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
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.
  3 件のコメント
Walter Roberson
Walter Roberson 2018 年 4 月 5 日
ls -ld /usr/local/bin/matlab
You will see the destination listed. You can
sudo rm /usr/local/bin/matlab
sudo ln -s Full_path_of_whereever_2017a_lives /usr/local/bin/matlab
Full_path_of_whereever_2017a_lives should the old content you saw listed for /usr/local/bin/matlab except with 2017b replaced by 2017a
Walter Roberson
Walter Roberson 2018 年 5 月 22 日
I recommend that you put the following in your ~/.bash_profile
alias matlab="/Applications/MATLAB_R2018a.app/bin/matlab -nojvm -nodesktop"
Once it is there, any new interactive shells for that user will allow you to type
matlab
to invoke MATLAB. You might want to play with the flags: when I am using MATLAB from the command window, I am wanting to use it in non-graphics mode, which is why I use the flags I do.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by