First step is to install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"then install bash
brew install bashafter that, you can go to see if new bash is install correctly
ls -al /usr/local/bin | grep bashThe result should show the symlink (->) like this
lrwxr-xr-x (some useless info here) bash -> ../Cellar/bash/4.3.18/bin/bashThe version might not be exactly 4.3.18, but everything above that is okay.
Now it's time to update your bash by create symlink to /usr/bin/bash.
But, before we can create symlink, just in case something go wrong, we have to backup the existing bash first.
sudo mv -r /usr/bin/bash /usr/bin/bash_oldthen crete symlink from /usr/local/bin/bash to /usr/bin/bash
sudo ln -s /usr/local/bin/bash /usr/bin/bashAfter you restart terminal, everything should be ready
If you're still not convince, you can try
bash --version