When bash is invoked as an interactive login shell, which of the following sentences is true?
A.
It first reads and executes commands in /etc/profile and then does same for ~/.bash_profile and
~/.bashrc
B.
It first reads and executes commands in /etc/bashrc and then does same for /etc/profile
C.
It reads and executes commands in ~/.bashrc only if /etc/profile or another initialization script
calls it.
D.
It ignores /etc/profile and only reads and executes commands in ~/.bashrc
E.
It first reads and executes commands in /etc/profile and then does same for ~/.bash_profile,
~/.bash_login and ~/.profile
in my tests, bash read first /etc/bashrc, /etc/profile, ~/.bashrc and ~/.profile
My bad! its correct. The order is /etc/profile –Call?–> /etc/bashrc, ~/.profile –Call?–> ~/.bashrc. the profiles call all bashrc’s.