I installed some command line programs (e.g. rbenv
), but every time I open a new Terminal tab, it looks like the environment gets reset. I need to source my .bash_profile manually:
source ~/.bash_profile
I followed some tutorials and put this code in my .bash_profile, but it doesn't work:
if [ -n "$BASH_VERSION" ] && [ -f $HOME/.bashrc ];then
source $HOME/.bashrc
fi
This doesn't happen on my old Mac, and I don't know how to configure this.
.bash_profile
doesn't get sourced automatically on startup, changing its content (as you describe in the question) won't make it get sourced. What is in your.bashrc
, in your.bash_profile
, in your.profile
? – nohillside Feb 20 '18 at 15:51