2012年5月10日木曜日

Linux 環境変数追加方法

Linuxで環境変数を追加する場所は、以下のとおり。
全ユーザー共通
/etc/profile
ユーザー単位
~/.bash_profile
~/.bashrc
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi
...
.bash_profileはログイン時に読み込まれる。.bashrcは上記のように.bash_profileが事項される時にあわせて実行されるが、それとは別に、対話型シェルが実行される時に読み込まれる。

0 件のコメント:

コメントを投稿