On Linux you can set a temporary environment variable in a shell. The process differs depending on the type of shell (csh, bash, tcsh) you are using.Linuxでは、シェルで一時的な環境変数を設定することができます。使用するシェルの種類(csh、bash、tcsh)により、手順が異なります。
1.Start a shell and enter:シェルを起動し、次のコマンドを入力します。
echo $SHELL
2.If you are running a bash or ksh shell, use export to set the environment variable, for example:bashやkshのシェルを使っている場合、exportで環境変数を設定します。
export lightmap_LICENSE=/Shared/lightmap/licenses/hdrlightstudio.lic
3.If you are running a csh or tcsh shell, use setenv to set the environment variable, for example:cshまたはtcshシェルを実行している場合、setenvを使用して環境変数を設定します。
setenv lightmap_LICENSE /Shared/lightmap/licenses/hdrlightstudio.licIn
the above example, the environment variable (lightmap_LICENSE) only exists in this shell. For a permanent solution for you as a user, you'll need to add the environment variable to your .cshrc, .tcshrc, .bashrc, .kshrc file in your home directory. For a permanent, system wide solution, then get your systems administrator to add it to /etc/profile.上記の例では、環境変数(lightmap_LICENSE)は、このシェルにのみ存在します。ユーザーとして永続的に解決するには、ホームディレクトリの .cshrc、.tcshrc、.bashrc、.kshrc ファイルに環境変数を追加する必要があります。今後の恒久的な解決策としては、システム管理者に依頼して、/etc/profileに追加してもらうとよいでしょう。