Upgrading to Bash 4 on macOS
Incredibly, macOS Mojave comes with Bash 3.22 by default still. Apparently this is due to licensing reasons, however Bash 4 has lots of lovely features including associative arrays that I'd like use. Hence, after reading the Internet for a bit, I've installed it on my Mac. This turned out to require just 3 commands: $ brew install bash $ sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells' $ chsh -s /usr/local/bin/bash Close the terminal and open… continue reading.