Pragmatic summary of shells
2023-03-26
The ones in bold are the ones you might run into in day-to-day software. The others, you might notice occasionally in old documents. This is probably incorrect (I was not around when the majority of these were written), but maybe helpful.
I categorise the following as "POSIX-compatible shells". The subset of functionality that's possible in POSIX sh is fairly limited, but worth being familiar with, since they will run pretty much everywhere.
- POSIX sh: a standard written in the 80s or something that defines how shells "should" behave
- Almquist Shell (ash): comes with busybox (a one-binary toolkit that runs on many embedded systems)
- Debian Almquist Shell (dash):
/bin/shon Ubuntu and Debian systems
- Debian Almquist Shell (dash):
- Bourne Shell: default on System 7 Unix
- ksh: nobody uses this any more
- Bourne Again Shell (bash): the default on most modern systems
- Almquist Shell (ash): comes with busybox (a one-binary toolkit that runs on many embedded systems)
The following are not compatible with POSIX sh, but have more user-friendly features or customisation. Typically people will use these as their "main interface", but continue to write scripts in POSIX sh or bash.
- C-shell (csh): nobody uses this any more
- tcsh: nobody uses this any more
- zsh: way too many features, a favourite of a lot of software engineers. Has a compatibility mode for POSIX sh.
- fish: friendly shell focusing on interactive mode, not scripts
- Powershell: object-oriented cross-platform shell created by Microsoft
The following are some wild new approaches to shells that haven't hit the mainstream yet.
- Oil Shell: aims to be a bash-compatible modern shell with nicer syntax and semantics.
- Nushell: data-oriented cross-platform shell.
Alternative reading: