Skip to main content

Upgrade to bash 4 in macOS

Jose CerrejonLess than 1 minuteAppleApple

Upgrade to bash 4 in macOS

bash 4
bash 4

I know. Sorry for the long delay in updates. Been extremely busy with my job developing mobile apps and other stuff.

I came here just for write a notes about install Bash 4 to get some interesting feature from this Shell.


First we are going to get your current Bash version installed. If you have 4.X, skip this guide and enjoy your life 😃

bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15)
Copyright (C) 2007 Free Software Foundation, Inc.

We are going to use the great Homebrewopen in new window package manager:

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

Last step is to get it as the default Shell in your system:

sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
chsh -s /usr/local/bin/bash

Link: admon.org > New Features in Bash-4.0open in new window