環境変数
ログイン時(実行順)
- /etc/profile
- /etc/profile/profile.d (ディレクトリ .shが全て実行される)
- ~/.bash_profile
上のファイルがなければ
- ~/.bash_login
- ~/.profile
- ~/.bashrc
- /etc/bashrc
- bash実行
全ユーザーにPATHを追加するとき
profile.dに.shファイルを追加するといい
特定のユーザーにPATHを追加するとき
/.bash_profileに追加するといい
ログアウト時
- ~/.bash_logout
PATHの確認方法
コマンド格納場所
- /bin 基本コマンド
- /sbin 管理者用コマンド
- /usr/bin アプリケーションで利用する基本コマンド
- /usr/sbin アプリケーションで利用する管理者用コマンド
- /usr/local/bin 追加したソフトやパッケージ用のコマンド
- /usr/local/sbin 追加した管理者用のコマンド
- /home//bin ユーザーが追加したコマンド
refs