Linux – Comparison of Unix shells

linuxshellunix

Of the major Unix shells (bash, ksh, tcsh, zsh, others?), are there any compelling reasons to use one over another?

  • Which is the most interactive/command-line friendly?
  • Which is the most conducive/intuitive for writing scripts?
  • Are there any major built-in features that one shell offers that others don't?
  • Are any of these shells really good for one type of function, but not another? Or are they all pretty well-rounded/flexible?
  • Is it just a matter of personal preference?

I can make this community wiki if anyone prefers.

Best Answer

Current:

  • bash — Bourne again shell, default shell in most Linux distributions. Decent features;
  • zsh — the most feature rich, but still rarely used;
  • ksh — default shell in Solaris, AIX and other few other unices;
  • tcsh — default shell in various *BSD flavor unices;

Historic:

  • sh — original Bourne shell (released 1977). Obsoleted by bash;
  • csh — original C shell (released 1978). Obsoleted by tcsh and ksh;

Note, that bash, ksh and zsh derive from sh syntax, while tcsh derives from csh syntax. This are two quite different syntaxes.

The feature chart (wiki).