Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 installed a more recent version of zsh using homebrew, located at /usr/local/bin/zsh.

which zsh returns /bin/zsh.

How can I make /usr/local/bin/zsh the default, without adding the entire /usr/local/bin directory to the beginning of my $PATH?

share|improve this question
Ugly but working: Add ~/bin to your path before the /bin entry. Then create a [soft] link to /usr/local/bin/zsh – Hennes Mar 29 '13 at 22:59
why not add /usr/local/bin to the beginning of $PATH? – MattDMo Mar 29 '13 at 23:11
@MattDMo because I don't want everything in there to be used as default. – Tom Mar 29 '13 at 23:24

Just symlink it to /usr/bin or some other folder before /bin:

sudo ln -s /usr/local/bin/zsh /usr/bin/

If you want to change the login shell, add /usr/local/bin/zsh to /etc/shells and run chsh.

I have /usr/local/bin before /bin on the path, and I haven't really run into any issues because of it. Some TextMate commands don't work with newer versions of Ruby or bash though.

share|improve this answer
TextMate uses its own path that can be configured in case of problems – slhck Mar 30 '13 at 7:19
Yeah, but I also wanted to make #!/usr/bin/env bash bash 4. – user495470 Mar 30 '13 at 9:03

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.