LoginSignup
1
1

More than 3 years have passed since last update.

Linux 標準シェル(bash)の主な環境設定ファイル

Last updated at Posted at 2020-11-29

【Linux 標準シェル(bash)の主な環境設定ファイル】

全ユーザー

bash起動時に読み込み

・/etc/bash.bashrc
→bash起動時に実行させたい処理(Debian系) 

・/etc/bash.rc
→bash起動時に実行させたい処理(RedHat系)

ログイン時

・/etc/profile
→環境変数、利用環境にかかわるもの

各ユーザー 個別

ログイン時

・~/.bash_profile
→環境変数などユーザー環境にかかわるもの

※ このファイルのパーミッションには、読み取り権が必要。
このホームディレクトリの所有者であるユーザは読み書き権限を持つ。

・~/.bash_login
→/bash_profileがない場合の読み込み次候補(/.bash_profileと内容同じ)

・~/.profile
→/.bash_loginがない場合の読み込み次候補(/.bash_profileと内容同じ)

bash起動時

・~/.bashrc
→bash起動時に実行させたい処理

ログアウト時

・~/.bash_logout
→ログアウト時に実行させたい処理

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1