Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How can I set my /usr/local/bin/bash (which is the 4.2 version that allows auto-completion of 'cd to directory with directory name') to be my default bash for a new window instead of my regular (v3.2.48) version.

I can type /usr/local/bin/bash and get into it but that's not the default for a new Terminal window which is what I want.

share|improve this question
1  
Is this what you seek? apple.stackexchange.com/questions/7984/… –  bmike Jul 10 '12 at 3:34
    
No, this is about specifying a new shell entirely (likely an updated version of the bash shell), not simply about changing to use bash. –  Jason Salaz Jul 10 '12 at 5:50
    
Oh yeah - thanks for digging up how to add a custom shell to the list of ones that are trusted by the OS. –  bmike Jul 10 '12 at 12:24

2 Answers 2

up vote 11 down vote accepted

1) go to "System Preferences" > "Users & Groups"

2) click the padlock icon and authenticate

3) right-click the icon for your user and select "Advanced Options..."

4) change the value for "Login shell" from "/bin/bash" to your preferred shell

enter image description here

share|improve this answer

I don't know if this will populate in the terminal / advanced user account locations, but "The Way This Has Worked For Years"™ in Linux-land is that you must update /etc/shells with the path to the shell location, and then use chsh -s /usr/local/bin/bash username to use it.

Simply running chsh without modification to /etc/shells should cause an error indicating you've chosen an invalid shell, in case you're curious.

/etc/shells is a root-owned file, so you must use sudo in tandem with an editor in order to modify it. I hope you're comfortable doing that, else I would highly advise against trying out a non-default shell :).

share|improve this answer

Your Answer

 
discard

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.