[sf-lug] BASH vs DASH to SH vs DASH ?

Sujit K M kmsujit at gmail.com
Mon Aug 8 21:37:08 PDT 2016


On Tue, Aug 9, 2016 at 9:45 AM, Sujit K M <kmsujit at gmail.com> wrote:
> On Tue, Aug 9, 2016 at 9:31 AM, Michael Paoli
> <Michael.Paoli at cal.berkeley.edu> wrote:
>> sh would be ambiguous, as various shells may possibly provide sh.
>> E.g. in Debian, at various times, sh has been bash or dash.
>>
>> Unless perhaps you're talking context of first line of shell script,
>> notably:
>> #!/bin/sh
>> vs.
>> #!/bin/bash
>
> I have read the article I had sent in my previous mail.
> https://wiki.ubuntu.com/DashAsBinSh
> I found that DASH being performance friendly safer than BASH or SH for
> that matter in the case
> of booting, but many startup scripts use BASH. So instead of changing
> each of these scripts it
> was better to change the shell.
>
> quote from the wiki below.
>
> "A large number of shell instances are started as part of the Ubuntu
> boot process. Rather than change each of them individually to run
> explicitly under /bin/dash, a change which would require significant
> ongoing maintenance and which would be liable to regress if not paid
> close attention, the Ubuntu core development team felt that it was
> best simply to change the default shell. "
>
> Why SH vs DASH rather than BASH vs DASH, quote from the wiki.
>
> "The boot speed improvements in Ubuntu 6.10 were often incorrectly
> attributed to Upstart, which is a fine platform for future development
> of the init system but in Ubuntu 6.10 was primarily running in System
> V compatibility mode with only small behavioural changes. These
> improvements were in fact largely due to the changed /bin/sh."

I also find that SH implementation is more POSIX Compliant that BASH.
Also it can be symlinked to DASH. Initially SH seems to be linked with
BASH, But Debian Generally Links it to DASH.




More information about the sf-lug mailing list