macOS uses a completely outdated version of Bash ↦
This post from Daniel Weibel not only explains how macOS uses an outdated version of Bash, but also how to upgrade to the latest Bash via Homebrew.
One thing that many macOS users don’t know is that they are using a completely outdated version of the Bash shell. However, it is highly recommended to use a newer version of Bash on macOS, because it enables you to use useful new features.
$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
Copyright (C) 2007 Free Software Foundation, Inc.
The reason Apple uses this old version of Bash has to do with licensing. Bash 4.0 and newer uses the GNU General Public License v3 (GPLv3), which Apple doesn’t support. There are some discussions about this on Reddit.
Version 3.2 of GNU Bash is the last version with a license that Apple is willing to accept, and so it sticks with it.
Discussion
Sign in or Join to comment or subscribe
Adam Stacoviak
Austin, TX
Founder and Editor-in-Chief of Changelog
2019-01-17T17:30:41Z ago
I didn’t know this before reading this post from Daniel. But, truth be told, I’m a Zsh user.
Jerod Santo
Bennington, Nebraska
Jerod co-hosts The Changelog, crashes JS Party & takes out the trash (his old code) once in awhile.
2019-01-17T21:01:50Z ago
I found this out recently (loyal/lazy Bash user here) when @gerhard was doing some fancy bash scripting and used features that didn’t yet exist in the version of Bash installed on my machine.
He recently switched to Linux, so we’ve had quite a few “works on my machine” moments as of late.
Justin Dorfman
Los Angeles
2019-01-21T23:02:18Z ago
I knew this but totally forgot to upgrade it with brew since ~2016. Maybe I’ll write a GitHub action.
Yay
GNU bash, version 5.0.0(1)-release (x86_64-apple-darwin18.2.0); Copyright (C) 2019 Free Software Foundation, Inc.