Via the command line
On Mac OS X merely running
sudo chsh is not enough, as Lion doesn’t treat
/etc/passwd as the definitive authority of user account information, but instead defers to a thing called "Directory Service" that is managed using
For example, changing your user’s shell to
$ sudo dscl > list Local/Default/Users > read Local/Default/Users/<username> > change Local/Default/Users/<username> UserShell /bin/bash /usr/local/bin/zsh
Via the GUI
Go to the "Users & Groups" pane of the System Preferences application:
- Click the padlock to unlock the pane
- Right click on your user account in the list on the left, and select "Advanced Options"
- Select the desired shell from the list of available shells
Note that if you’ve added a custom shell to
/etc/shells it may not be visible in the list until your next login.