What's the difference between
When bash initializes a non-login interactive bash shell on a Debian/Ubuntu-like system, the shell first reads
/etc/bash.bashrc and then reads
The reason that
/etc/bash.bashrc does not appear in normal bash documentation (such as here or here) is that it is a feature added by Debian and adopted by Ubuntu. As Debian explains it (readme.debian):
What is /etc/bash.bashrc? It doesn't seem to be documented.
The Debian version of bash is compiled with a special option (
-DSYS_BASHRC) that makes bash read
~/.bashrcfor interactive non-login shells. So, on Debian systems,
/etc/bash.bashrc is documented in the Debian and Ubuntu man pages but not in man pages from other distributions that do not support this feature.
System wide initialization file
and the standard personal initialization file
if the shell is interactivе.