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
or ksh93
on the commercial Unix implementations
- a modified
bash
on OS/X
(though it used to be zsh
)
- an
ash
or pdksh
derivative on other BSDs
bash
or dash
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.
sh
symlinked toksh
? – Gilles 'SO- stop being evil' Nov 05 '13 at 23:08ksh
. – strugee Nov 06 '13 at 19:16bash
, IIRC. – strugee Nov 06 '13 at 19:17sh
is based on a standard which means we can have several implementations that will behave in a clear specified way as long as you use the standard syntax in your script. – Stéphane Chazelas Aug 18 '15 at 21:28