What do you think to switch bash to dash?

Hello,

Many systems use dash as the default as /bin/sh.
Why not manjaro?
Knowing that it is very fast and light.
With a smaller attack surface.
It is also POSIX compliant.

Best Regards

What for?

man chsh

oh god no.
Most manjaro ISOs now ship zsh by default and thats arguably problem enough.

(PS - dash is only for POSIX and non-interactive scripts.)

Why? Default shell interpreter should be POSIX-compliant, dash is POSIX-compliant. People who run bash-specific scripts will already set it explicitly in the shebang?

Or, are you saying that there are scripts which have a #!/bin/sh shebang but which contain bashisms?

What about #!/usr/bin/env bash ?
(yeah it should probably work)
But if we are going to use bash anyways … whats the point of dash? just so it can automatically spawn 6 instances of itself at boot to waste resources and appear quick, like some sort of windoze app?

That’s specifying bash as the interpreter, so that’s fine for bash scripts (or any POSIX-compatible script, actually).

There’s plenty of rationale out there already.

I mean - if bash already does that then there’s a problem anyway. :wink:

Like what? Supposedly it has a lower RAM overhead in general … but that seems to only really be applicable at larger scale and for people who live in multiple terminal sessions as their main system activity - not the majority of manjaro users.

1 Like

If it’s used as the default shell interpreter then its smaller size etc. mean all the default shell scripts load faster, run more quickly, and use less RAM. Or at least, that’s why Ubuntu does it. :man_shrugging:

Make sure you’re not confusing default shell with default shell interpreter.

FFS, I can’t help but help… :roll_eyes:

1 Like

Dont worry - you randomly taking time out to specifically nitpick my comments without providing much information isnt helping very much … maybe now that there is some content it might help some folks understand ‘why ubuntu’ uses dash.

1 Like

Whoa, OK, take it down a notch. :grimacing:

Apparently using dash instead of bash as the default shell interpreter is too controversial so I’ll leave it here.

1 Like

Maybe I am just being testy. But it is 2 days in a row now when you remarkably silent otherwise.
“Ta”

2 Likes

Sincerely, thank you @jonathon for taking the time to explain dash.
I didn’t think it would be as tense as a conversation.
I just think there may be some before to use dash by default.
But if it poses so much concern. I will not insist.

Best Regards

1 Like

Bspwm edition is focused on minimal configuration and performance, so it uses dash extensively. Zsh for insteractive shell, dash for scripts where performance matters, and bash or interactive scripts where performance does not really matter.

The reason we are not using dash as /bin/sh is that we don’t know how many scripts in the repos have bashisms without properly using right shebang explicitly. Ubuntu is a biggers, point release distro, so they had more resources to do things like that. So, we haven’t done it because some things might break, and we don’t know what and how many.

You can do it on your own system though if you want. Arch wiki has good instructions for this:

https://wiki.archlinux.org/index.php/Dash

2 Likes