bash
Unix shell bash の基本
bash 設定ファイルの読み込み順
~/ を覗くと、bash に関連するいくつかの設定ファイルがあります。
- .bash_profile
- .bashrc
- .bash_history
- .bash_logout
/etc/ にも bash の設定ファイルは存在します。
- /etc/bashrc
- /etc/profile
- /etc/profile.d/*
これらのファイルは以下のような順で自動的に読み込まれます。
- /etc/profile → /etc/profile.d/*
- /etc/bashrc
- ~/bash_profile → ~/.bashrc(内部で /etc/bashrc を読む)
* .bash_profileは基本的にログインしたときだけ読み込まれます
* アカウントごとの設定は .bashrc に書いておきます