Updating Bash on my Mac

Some applications started to require a newer version of the bash shell on my Mac. Apple ships a version of 3.2 but Bash is up to version 4.4 and Apple is not able to ship a newer version because Bash 4 uses a GPLv3 license.

I found this quick solution where you use homebrew to install the latest Bash version and changing the terminal configuration to use this new shell.

If you don’t have homebrew it is quite easy with this one command:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then you simply have to execute:

brew install bash

Changing the terminal configuration is easy because it is on te first tab of the preferences. Where it says “Shells open with” change from “Default login shell” to “Command (complete path)” and enter this string:

/usr/local/Cellar/bash/4.4.19/bin/bash

Obviously your version may vary depending on what is the latest one available.

 

Reference:
https://apple.stackexchange.com/questions/193411/update-bash-to-version-4-0-on-osx
https://brew.sh/

Advertisements

Published by

m5c

Java developper that loves photography and good coffee

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s