since Mountain Lion still uses the old bash 3.x, I was wondering if there is a good tutorial (or if somebody could post one here) on how to upgrade bash to the latest version. Also, it would be helpful to know how to set the path so that it can be used in terminal.
Thanks in advance
Change The Default Bash on Mac First, you will need to update the list of permitted shells by adding the bash brew version into /private/etc/shells . You can do this by editing directly the file or using the tee -a command as shown below. Finally, you will need to update your user's shell with the chpass command line.
Mac OS X comes with the Bourne Again SHell (bash) as the default user shell and also includes the TENEX C shell (tcsh), the Korn shell (ksh), and the Z shell (zsh). bash, ksh, and zsh are compatible with sh, the original Bourne shell.
brew update
brew install bash
/usr/local/bin/bash
to /etc/shells
chsh -s /usr/local/bin/bash
You don't normally have to change any settings in Terminal or iTerm 2. Both of them default to opening new shells with the default login shell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With