Use the following command is much more effective!
chsh -s /usr/local/bin/bash
Below is the original post:
brew install bash # install the 5.0 version bash with `brew`:
Then, edit the
/etc/shells file and add the 5.0 version bash's PATH on the top of the shells:
➜ cat /etc/shells