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

So, the question pretty much says it all. I'm on Snow Leopard, and I do a lot of web development, particularly in Rails 3 which makes heavy use of the console.

I've seen some notable bloggers etc. mention Zsh as their preference over Bash, but I don't know what difference it would make.

Could anyone give me a good comparison of what difference there is and what might make one prefer one option or the other?


share|improve this question
Why not moving this to SO as the fact that it's on a Mac has a low incidence on the question I think. Moreover, I think you will have more answers over there. – LudoMC Feb 3 '11 at 10:31
Actually, I think the question is more relevant for SuperUser. – ghoppe Feb 3 '11 at 14:50
Fair enough, will post to SuperUser. – Andrew Feb 3 '11 at 15:17
up vote 7 down vote accepted

This is from the Zsh FAQ:

2.5: Similarities with bash

The Bourne-Again Shell, bash, is another enhanced Bourne-like shell; the most obvious 
difference from zsh is that it does not attempt to emulate the Korn shell. Since both 
shells are under active development it is probably not sensible to be too specific 
here. Broadly, bash has paid more attention to standards compliancy (i.e. POSIX) for 
longer, and has so far avoided the more abstruse interactive features (programmable 
completion, etc.) that zsh has.

I've used them both, but prefer Bash now days because the machines I work on default to bash consistently. The standards-compliancy comment is important to me because that means consistency between OSes.

Zsh has nice autocompletion abilities, but I kept finding cases where it didn't know what I wanted. That was several years ago, so it might have improved since then.

I've found that enabling "vi-mode" (set -o vi) in Bash makes it a much nicer command-line environment than it normally is, so I do that immediately in my .bashrc file.

When writing shell scripts I don't ever program in either bash or zsh - I program using sh (/bin/sh), because it's the lowest common denominator and the least likely to have compatibility issues. That's just an old habit that has stood me well.

share|improve this answer
One difference is that wildcard characters behave different. For example to find all instances of files named "vi" one can use bash with command locate */vi. Using zsh the result for the same command is zsh: no matches found: */vi. To make the search work in zsh, the search query has to be surrounded by quotes like locate "*/vi". – Pro Backup Jul 3 '12 at 20:46

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.