I have used homebrew to install the newest version of bash on my local system. I have added a symbolic link from: /usr/local/bin/bash to /usr/local/Cellar/bash/4.2.20/bin/bash and added the line: /usr/local/bin/bash to /etc/shells

When I load my terminal I am still getting the older version of bash, also when i execute the command: /etc/local/Cellar/bash/4.2.20/bin/bash my prompt changes to bash-4.2$ but when i do bash --version it still says I am in version 3.2. Does anyone know what step I am missing?


You'll need to change your account's login shell from System Preferences, Users & Groups. You need to access the Advanced Options by right-clicking on your username and changing your shell to /usr/local/bin/bash. Once you've done that, restart Terminal.app (to make sure no old sessions with the wrong shell are left hanging around) and you should be set.

Change login shell

You can do the same using dscl:

dscl . -change /Users/<username> UserShell /usr/local/bin/bash
  • Are you sure about the logging out part? I've always found that simply restarting Terminal.app is enough. But I don't remember if I had to log out for Lion. – ismail Feb 26 '12 at 0:13
  • Good point - it's probably not necessary (restarting Terminal.app should suffice). I'll adjust my answer - thanks. – mjturner Feb 26 '12 at 13:25
  • Interesting, I already have this line this set. But the bash version is still 3.2. – trev9065 Feb 27 '12 at 1:19
  • @trev9065 Are you sure it's not because of your $PATH? Can you do an "echo $BASH_VERSION" after opening Terminal.app and let us know the results? – mjturner Feb 27 '12 at 9:36
  • @mjturner ok so when i did echo $BASH_VERSION it gave me 4.2, why is the bash variable set but not the path. Should I set the path to my /usr/local/bin/bash or is it not necessary? – trev9065 Feb 27 '12 at 13:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .