DEV Community

How to change bash versions on Mac with Homebrew

Emily Cain on March 04, 2020

MacOS comes with bash 3 as the default shell program; Apple doesn't want to upgrade to the later versions for intellectual property reasons. This m...
Collapse
 
chadcatlett profile image
Chad Catlett

For what it's worth, you can set /usr/local/bin/bash in /etc/shells then use that path so that if you upgrade bash to a new release you don't have to bother with updated /etc/shells and changing your user's shell.

Collapse
 
slmingol profile image
Sam Mingo

Seems to have changed along the way with brew. Now use this for the /etc/shells entry - /opt/homebrew/bin/bash.

Collapse
 
sevmorris profile image
Seven Morris

The path changed for M1 Macs. It's still /usr/local/bin/bash on Intel Macs.

Collapse
 
sahara_090312_f1c95732b84 profile image
Sahara 090312

Followed these instructions to the letter and now I'm locked out of my terminal on Mac. it says login: /usr/local/Cellar/bash/5.3.9: Permission denied

[Process completed]

I need help, please. I am NOT a computer person. I know just enough to get in trouble (obviously).

Collapse
 
keithshum profile image
Keith Shum

Really good stuff, thank you! =)