Why does no one use the true Bourne shell as /bin/sh?
I'd guess lack of features - no command history, no fancy redirection, no command line editing. BSD introduced csh
the C shell for those reasons. Another factor is that the Genuine Bourne Shell was only recently available in open source form. Unless you licensed it, you couldn't distribute it. That put it out of reach for free-of-cost distros, and made it ideologically unpalatable for other distros, and *BSDs.
But the code is available now. You can take a look, compile it, give it a spin.
The statement in your question is incorrect. Solaris up to version 10 is providing the legacy true Bourne shell as /bin/sh
. This was done not to break compatibility with old scripts that might fail with a different shell. This choice was very frustrating otherwise though.
Most if not all remaining Unix and Unix like releases, including Solaris 11, do provide a POSIX compatible shell as /bin/sh
because POSIX mandates the sh
command to launch a POSIX shell, not the legacy Bourne shell which is not compliant. /bin/sh
is generally :
ksh88
orksh93
on the commercial Unix implementations- a modified
bash
onOS/X
(though it used to bezsh
) - an
ash
orpdksh
derivative on otherBSDs
bash
ordash
on Gnu/Linux distributions.
It is not necessarily a link but can be a real executable on many systems but Gnu/Linuxes.
Interestingly, despite what states the most upvoted answer to your question, it is not the lack of features that lead distribution developers to install something different than the legacy Bourne shell in /bin/sh
but the desire to be as POSIX compliant as possible, i.e. to behave like a Unix like OS. The fact the POSIX shell has more features than the legacy Bourne shell is only a side effect of this standard compliance goal.
It is also a fact some shells, notably bash
, behave differently when called sh
, and this mostly removes features from the shell, not the other way around.
As far as I know the original Bourne shell couldn't be used by the BSDs and the GNU project, because of its license.
Back then the original Unix had no license and the GNU project needed a shell that was under the GPL so they used the bash.
The same thing is true for BSD4 the parent of all BSDs. Thanks to the AT&T lawsuit they needed to rewrite all source from the original Unix including the Bourne shell.
In the traditional BSD line, the Bourne shell was shipped until 4.3BSD-Reno (but not anymore with Net/2 and the following 4.4BSDs). For license reasons it was then substituted with the bourne-compatible, svr4-like sh by Kenneth Almquist (often called ash).
From FreeBSDs man sh
A sh command, the Thompson shell, appeared in Version 1 AT&T UNIX. It was superseded in Version 7 AT&T UNIX by the Bourne shell, which inherited the name sh.
This version of sh was rewritten in 1989 under the BSD license after the Bourne shell from AT&T System V Release 4 UNIX
So both projects were forced to not use the Bourne shell and settle for an true open source shell.