the terminal in mac, terminal.app run as login shell everytime.

a login shell will run

/etc/bashrc
~/.bash_profile

while a non-login shell, which is what Linux or Unix OS will do after logged in. it runs

~/.bashrc

instead.

to have a consistency, add

if [ -f ~/.bashrc ]; then
   source ~/.bashrc
fi

into ./bash_profile. so, everytime the login shell was run, it will call ~/.bashrc

Advertisements