bashrc not loading automatically?
By default on a Mac OS X and other *nix systems, Terminal starts the shell via /usr/bin/login
, which makes the shell a login shell. On every platform (not just Mac OS X) bash does not use .bashrc
for login shells (uses only /etc/profile
and the first of .bash_profile
, .bash_login
, .profile
that exists and is readable). This is why adding source ~/.bashrc
in your .bash_profile
usually works.
But if that doesn't work, try adding the settings to /etc/profile
or /etc/bash.bashrc
#cat /etc/bash.bashrc
HISTSIZE=-1
HISTFILESIZE=-1
HISTTIMEFORMAT="[%F %T] "
PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND