I am running El Capitan 10.11.3 with bash version 3.x so I decided to update bash via:
brew install bash
Brew places the new bash under /usr/local/Cellar/bash:
brew info bash bash: stable 4.3.42 (bottled), devel 4.4-beta, HEAD Bourne-Again SHell, a UNIX command interpreter https://www.gnu.org/software/bash/ /usr/local/Cellar/bash/4.3.42 (59 files, 7.3M) * Poured from bottle From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/bash.rb ==> Dependencies Required: readline ✔ ==> Caveats In order to use this build of bash as your login shell, it must be added to /etc/shells.
As you can see brew mentions that I need to update
/etc/shells in order to use the new bash. But after closing/reopening the current shell
bash --versiontells me that now I am already using 4.3.42 so I wonder what happened under the hood that the new version is automatically used?