Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 9 down vote accepted

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 (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
share|improve this answer
Are you sure about the logging out part? I've always found that simply restarting 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 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 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.