What happens when you invoke bash?
From FVue
Contents
Debian
Debian-4.0 uses this bash invocation scheme:
Bash Startup Files -----------------------------------------------------
general completion time
-----------------------------------------------------------------------------
invoked as a login shell
+-> /etc/profile |
+-> ~/.bash_profile -----> ~/.bashrc |
| (~/.bash_login) |
| (~/.profile) |
+-> ~/.bash_logout v
invoked as a non-login shell +-> /etc/bash.bashrc ---------------------------+--> /etc/bash_completion | | v | | ~/.bash_completion | +-> ~/.bashrc v
Ubuntu
Ubuntu-7.10 uses this bash invocation scheme:
Bash Startup Files -----------------------------------------------------
general completion time
-----------------------------------------------------------------------------
invoked as a login shell
+-> /etc/profile --------> /etc/bash.bashrc -------> /etc/bash_completion |
| v |
| ~/.bash_completion |
+-> ~/.bash_profile -----> ~/.bashrc |
| (~/.bash_login) |
| (~/.profile) |
+-> ~/.bash_logout v
invoked as a non-login shell
+-> /etc/bash.bashrc ------------------------------> /etc/bash_completion |
| v |
| ~/.bash_completion |
+-> ~/.bashrc v
Suse 10.0
SuSE 10.0 uses this bash invocation scheme:
(SuSE) extensions
Bash Startup Files -----------------------------------------------------
general completion time
-----------------------------------------------------------------------------
invoked as an login shell
/etc/profile -----+--> /etc/profile.local |
+--> /etc/profile.d/*.sh |
+--> /etc/bash.bashrc ----+--> ~/.bash_completion |
| | +--> /etc/bash_completion |
| | +--> /etc/profile.d/complete.bash |
| v +--> /etc/bash_completion.d/*.sh |
| /etc/bash.bashrc.local |
+--> ~/.bashrc |
(~/.bash_profile) |
(~/.bash_login) |
~/.profile v
invoked as an non-login shell
/etc/bash.bashrc -+-------------------------+--> ~/.bash_completion |
| +--> /etc/bash_completion |
| +--> /etc/profile.d/complete.bash |
| +--> /etc/bash_completion.d/*.sh |
+--> /etc/bash.bashrc.local |
~/.bashrc v
See also
- Novell Developer Kit - What happens when you invoke bash
- Informative page explaining which files are looked for when you invoke bash.
- Human Readable - Harmonizing the Bash Startup Scripts
- Proposal for linking the bash startup scripts (Slackware)
- What happens when you Login?
- Detailed explanation of login sequence by Seton Hall University (Google HTML-version of Word document)
Advertisement