.bashrcのこのPATH文は何をしますか? [コピー]

.bashrcのこのPATH文は何をしますか? [コピー]

OpenMPIのインストールが完了し、プロセスが終了したら、次のように要求しました。

Then openmpi is installed at the directory indicated by prefix. Next,
add the following two lines to your ./bashrc file, which is located
at your home directory.

PATH=$PATH:/usr/local/openmpi-3.0.0/bin export PATH

When you open the terminal window next time, you can use openmpi. Make it sure by typing

$which mpirun

私は何をすべきですか?このステップが必要なのはなぜですか?

ベストアンサー1

PATHは、インストール場所へのフルパスを提供せずにシェルでコマンドを実行するシェル変数です。現在のコマンドパスを確認するには、シェルで次のコマンドを実行します。

# echo $PATH

別のパス /usr/local/openmpi-3.0.0/bin にソフトウェアをインストールし、openmpi の完全なコマンドパスは /usr/local/openmpi-3.0.0/bin/openmpi です。

したがって、/usr/local/openmpi-3.0.0/bin フォルダを PATH 変数に追加すると、単にコマンドを 。

# openmpi

それ以外の場合は実行する必要があります。

# /usr/local/openmpi-3.0.0/bin/openmpi

おすすめ記事