Why I am unable to switch bash to the one installed by homebrew? I'm trying to update bash to version 4.x. I did brew upgrade, then brew update, then brew install bash. I ran sudo bash -c "echo /usr/local/bin/bash &gt;&gt; /etc/shells" and sudo bash -c "echo /usr/local/bin/bash &gt;&gt; /private/etc/shells". I've tried symlinking /usr/local/Cellar/bash/4.3.32/bin/bash to /usr/local/bin/bash. I've closed Terminal.app. I've even logged out of Mac completely. Nothing I do has updated $BASH_VERSION to the right thing. bash --version does say the right thing, but I think I read somewhere that that is less reliable then echo $BASH_VERSION (maybe). Here's a summary of what I'm seeing:



I just need to know . . . what version of bash am I actually on? And if it's not 4.x, how do I reliably, definitively make it that?

I am on Yosemite FWIW.

Edit:

$PATH was too long for a comment. Here it is:

/Users/AndrewNichols/.rvm/gems/ruby-2.1.1/bin:/Users/AndrewNichols/.rvm/gems/ruby-2.1.1@global/bin:/Users/AndrewNichols/.rvm/rubies/ruby-2.1.1/bin:/usr/local/heroku/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/Cellar/grep/2.18/bin:/usr/local/opt/gnu-sed/libexec/gnubin:/usr/local/opt/gnu-tar/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/heroku/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/Cellar/grep/2.18/bin:/usr/local/opt/gnu-sed/libexec/gnubin:/usr/local/opt/gnu-tar/libexec/gnubin:~/activator:/Users/AndrewNichols/sonarqube-4.5/bin/macosx-universal-64:/Users/AndrewNichols/sonar-runner-2.4/bin:/Users/AndrewNichols/bin:~/activator:/Users/AndrewNichols/sonarqube-4.5/bin/macosx-universal-64:/Users/AndrewNichols/sonar-runner-2.4/bin:/Users/AndrewNichols/bin:/Users/AndrewNichols/.rvm/bin


Here's one split on colon, for readability:

'/Users/AndrewNichols/.rvm/gems/ruby-2.1.1/bin',
'/Users/AndrewNichols/.rvm/gems/ruby-2.1.1@global/bin',
'/Users/AndrewNichols/.rvm/rubies/ruby-2.1.1/bin',
'/usr/local/heroku/bin',
'/usr/local/opt/coreutils/libexec/gnubin',
'/usr/local/Cellar/grep/2.18/bin',
'/usr/local/opt/gnu-sed/libexec/gnubin',
'/usr/local/opt/gnu-tar/libexec/gnubin',
'/usr/local/bin',
'/usr/bin',
'/bin',
'/usr/sbin',
'/sbin',
'/opt/X11/bin',
'/usr/local/heroku/bin',
'/usr/local/opt/coreutils/libexec/gnubin',
'/usr/local/Cellar/grep/2.18/bin',
'/usr/local/opt/gnu-sed/libexec/gnubin',
'/usr/local/opt/gnu-tar/libexec/gnubin',
'~/activator',
'/Users/AndrewNichols/sonarqube-4.5/bin/macosx-universal-64',
'/Users/AndrewNichols/sonar-runner-2.4/bin',
'/Users/AndrewNichols/bin',
'~/activator',
'/Users/AndrewNichols/sonarqube-4.5/bin/macosx-universal-64',
'/Users/AndrewNichols/sonar-runner-2.4/bin',
'/Users/AndrewNichols/bin',
'/Users/AndrewNichols/.rvm/bin'


Some of the duplication there is because I have terminal set to run tmux on startup, so .bashrc gets sourced twice.
Okay, so apparently this was happening because tmux was holding on to the original bash version (even though I had exited tmux and reloaded it's config). tmux kill-server followed by relaunching tmux fixed it for me.