I have a strange problem with bash:
I switch my default shell to /bin/sh
from zsh and it doesn't execute ~/.bash_profile
or ~/.bashrc
when I open a new terminal, it only executes ~/.profile
.
What could be the problem?
I could probably source ~/.bashrc
from ~/.profile
but that does't seem like a good idea, e.g. it would break if I changed to another shell again.
Best Answer
I suggest that you read the
bash
manual under the headingINVOCATION
which states:A new terminal session in OS X/macOS always starts as a login shell.