note

環境変数

ログイン時(実行順)

  1. /etc/profile
  2. /etc/profile/profile.d (ディレクトリ .shが全て実行される)
  3. ~/.bash_profile 上のファイルがなければ
    1. ~/.bash_login
    2. ~/.profile
  4. ~/.bashrc
  5. /etc/bashrc
  6. bash実行

全ユーザーにPATHを追加するとき profile.dに.shファイルを追加するといい

特定のユーザーにPATHを追加するとき /.bash_profileに追加するといい

ログアウト時

  1. ~/.bash_logout

PATHの確認方法

echo $PATH

コマンド格納場所

  1. /bin 基本コマンド
  2. /sbin 管理者用コマンド
  3. /usr/bin アプリケーションで利用する基本コマンド
  4. /usr/sbin アプリケーションで利用する管理者用コマンド
  5. /usr/local/bin 追加したソフトやパッケージ用のコマンド
  6. /usr/local/sbin 追加した管理者用のコマンド
  7. /home//bin ユーザーが追加したコマンド

refs