little experiment shows in what order the config files are loaded after login…

login as non-root user

uname -a; # tested with
Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.43-2 (2017-04-30) i686 GNU/Linux

Broadcast message from user@debian (pts/0) (Fri May 19 10:10:50 2017):

this is /etc/bash.bashrc


Broadcast message from user@debian (pts/0) (Fri May 19 10:10:50 2017):

this is /etc/profile


Broadcast message from user@debian (pts/0) (Fri May 19 10:10:50 2017):

this is /home/user/.bashrc


Broadcast message from user@debian (pts/0) (Fri May 19 10:10:50 2017):

this is ~/.profile

# from a second console you can observer
Broadcast message from user@debian (pts/1) (Fri May 19 10:13:54 2017):

this is ~/.bash_logout
# is also run

login as root user

Broadcast message from user@debian (pts/0) (Fri May 19 10:09:59 2017):

this is /etc/bash.bashrc

conclusion:

there are MASSIVE amounts of config files that bash loads during login. (these mentioned are not all – there is more :-D)

maybe in the future this could be simplified? (like one per-user and one-system-wide config file?)

Unix Philosophy: Keep it small (modular) and beautiful.

Every week sit together and think: what could we throw out? 😀 (simplify)

root login seems to ignore /etc/profile

how?

i put a

wall „this is /etc/bash.bashrc“;

at the end of each.

admin