File bash-4.1-bash.bashrc.dif of Package bash
|BNC#577221 - Non-login, interactive bash executes /etc/bash.bashrc
| yet not documented
|Jared Hudson 2010-02-04 22:47:01 UTC
|bash-3.2-147.4.1 executes /etc/bash.bashrc when invoking an interactive,
|non-login shell yet this is not documented. The man page should mention
|this in its INVOCATION section. I've checked the source code and it's
|hard coded to execute /etc/bash.bashrc (SYS_BASHRC macro)
+++ doc/bash.1 2010-02-18 09:47:36.864126675 +0000
@@ -323,8 +323,8 @@ exists.
When an interactive shell that is not a login shell is started,
-reads and executes commands from \fI~/.bashrc\fP, if that file exists.
-This may be inhibited by using the
+reads and executes commands from \fI/etc/bash.bashrc\fP then \fI~/.bashrc\fP
+when those files exist and are readable. This may be inhibited by using the
The \fB\-\-rcfile\fP \fIfile\fP option will force
@@ -415,7 +415,8 @@ daemon, usually \fIrshd\fP, or the secur
determines it is being run in this fashion, it reads and executes
-commands from \fI~/.bashrc\fP, if that file exists and is readable.
+commands from \fI/etc/bash.bashrc\fP then \fI~/.bashrc\fP when
+those files exist and are readable.
It will not do this if invoked as \fBsh\fP.