LoginSignup
5
6

More than 5 years have passed since last update.

bash環境設定ファイル処理の流れ

Posted at

BASH

The GNU Bourne-Again SHell

bash起動時にどのような流れで環境設定ファイルが読み込まれるかのメモ

bash環境設定ファイル

.bash_history
bashで実行したコマンドの履歴

.bash_profile
ログイン時に実行される環境設定

.bash_logout
ログアウト時に実行される環境設定

.bashrc
.bash_profileからの呼び出しやシェル起動時に実行される環境設定

.bash_login
.bash_profileがない場合に使用されるログイン時の環境設定

.profile
.bash_profileや.bash_loginがない場合に使用されるログイン時の環境設定

ログインの流れ

ログイン
|
|
.bash_profile --
|                        |
|                        |
|             .bash_login --
|                        |           |
|                        |           |
|                        |      .profile
|                        |           |
|                        |           |
|--------------------------
|
|
.bashrc
|
|


ログアウトの流れ

.bash_logout
|
|
ログアウト

5
6
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
5
6