Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 17 submissions in the queue.
posted by janrinok on Thursday October 02 2014, @09:02PM   Printer-friendly
from the bash-dash-ash-mish-mash dept.

An interesting thread has been started on the Fedora mailing list proposing that Bash be replaced with Dash as the core (/bin/sh) shell. It should be noted though that this is still a thread discussion as far as I know, not a policy decision announcement, and nothing concrete has been reached.

Personally and even though this proposal seems at least partially based on the recent Shellshock hysteria I'm happy to see that people are finally starting to consider things like technical superiority and simplicity over politics, and treating bloat and feature creep as far from harmless. I also hope that other distribution maintainers have the same kind of discussion. I'd like to see Arch for example start using dash in the core install since even with shell script heavy systems - like those that use sysvinit - very rarely are non-POSIX features used and, when they are, they probably shouldn't be.

For those unaware dash is a tiny and robust shell that aims for strict POSIX conformance with as small a runtime and disk footprint as possible. It was originally a fork of ash which is a pretty good shell for embedded or otherwise thin systems and is what is built into busybox for a shell. Here is its official page.

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Informative) by Foobar Bazbot on Thursday October 02 2014, @10:03PM

    by Foobar Bazbot (37) on Thursday October 02 2014, @10:03PM (#101151) Journal

    They use dash just as a shell for init. Default user login shell is still bash! This is a "good thing".

    To be clear:

    • The "traditional" GNU/Linux setup has /bin/sh as a symlink to /bin/bash; the default shell for new users is usually /bin/bash.
    • The setup used in recent versions of Ubuntu, Debian, et al. has /bin/sh as a symlink to /bin/dash; the default shell for new users is still /bin/bash.

    (Of course all users who don't chsh -s /bin/zsh deserve what they get anyway, so it wouldn't matter if dash was the default...)

    This means that any shell script starting with #!/bin/sh is executed with dash, not merely those pertaining to init. Shouldn't be a problem, as one should either use #!/bin/bash or restrict oneself to portable/POSIX shell features, but nominally portable scripts tend to acquire a patina of bashisms when maintained in a /bin/sh -> bash environment.

    Starting Score:    1  point
    Moderation   +1  
       Informative=1, Total=1
    Extra 'Informative' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 2) by mth on Thursday October 02 2014, @11:43PM

    by mth (2848) on Thursday October 02 2014, @11:43PM (#101188) Homepage

    The setup used in recent versions of Ubuntu, Debian, et al. has /bin/sh as a symlink to /bin/dash; the default shell for new users is still /bin/bash.

    It's been like that for a while: I remember having to fix some scripts (remove bash-isms or use #!/bin/bash) on a Debian or Ubuntu upgrade that I think was about 8 years ago. So I think most problems in 3rd-party scripts have been fixed by now; it's scripts from Fedora itself and from admins that might stop working.

  • (Score: 3, Interesting) by Magic Oddball on Friday October 03 2014, @10:21PM

    by Magic Oddball (3847) on Friday October 03 2014, @10:21PM (#101530) Journal

    Of course all users who don't chsh -s /bin/zsh deserve what they get anyway

    Where exactly are they supposed to have learned about it? I've used Linux for 6.5 years, use the CLI all the time and solve all of my own system issues, yet it was only the past week or two that I've seen any real references to changing the default shell -- and this is the first time I've actually seen the command to do so. When that's the case for a very highly motivated non-programming user like me, there's virtually no chance of regular people that aren't fascinated with computers knowing about it...