[Proposal] Make Bash the default interactive shell again

Unfortunately,

There can be only one!

That’s where running:

bash

or

zsh

in the terminal comes in.

1 Like

It seems like there is a lot of misinformation and confusion in this topic.

The differences between syntax is minimal in most practical cases. Also, even if you run zsh that doesn’t mean you need to use zsh for your scripts. You can still write scripts in bash if that is your preference.

Both bash and zsh support running POSIX scripts and both enable non-POSIX extensions by default.

zsh does support functions in .zshrc. The code isn’t compatible with zsh because you used a bash-ism. If you made it POSIX-compliant, it would work just fine.

4 Likes

Personally, I don’t really care what the default shell is. I’ll change it to whatever I want to use anyway. While it’s nice to see a distribution trying out other defaults (like zsh over bash), there is something to be said new users being able to search for issues and the generic answers will work because they are using the same standard as everyone else.

If the only reason why we default to zsh is because of powerlevel10k and how “pretty” it looks, that’s not a good reason to default to it. However if it is because we like the functionality that is provided better than other alternatives, that makes sense. If the consensus is to move back to bash, then I would suggest including Oh My Bash (and yes that is a fork of oh my zsh), you’ll get pretty and functionality from it.

3 Likes

Personally, I use zsh with oh-my-zsh, powerlevel10k, & a whole buncha plugins.

However, every script I’ve ever written begins with #!/usr/bin/env bash :stuck_out_tongue:

If y’all decide to go with bash as the default - it’s what, three(?)… additional commands I gotta run (two if zsh is already installed). And only once, when I setup my system.

It’s really not that big an inconvenience.

If it makes your life easier, have at it.

1 Like

Regarding reason #3, I favor the current zsh default because I am disabled and it made it easy to reuse history without searching it by hand.

IF YOU GO BACK TO BASH, PLEASE MAKE A SIMILAR INTERFACE PROVISION FOR HANDICAPPED USERS. IT’S NOT JUST THE PRETTY VISUALS, HONEST!

Thanks,

R

Hi @rf2020,

Do not worry. If it happens, there will still be a way to change it. I did it before the change to zsh so I know it can be done.

1 Like

option 3 should be , by default Bash ,
but if your are Dev and you know zsh , then you can choose zsh

other question under zsh , if i launch
“sh ./script.sh” ( bash script , with shebang included )

I use it because some things in scripting are more modern.

  • you have “print” as an internal “find”
  • you can compile scripts easily

I know that in using these my script will only work with zsh. But i find the zsh syntax easy to remember, so it is faster for me to script.

I vote to keep bash. I was dismayed when i did a fresh install and had zsh. It took me a bit (and i have been using linux for decades at this point) to change everything back to used bash. A new user or one coming from Ubuntu,etc would not have a clue how to change it back. If an advanced user wants to swap whole hog to zsh, then more power to them. However, it is irresponsible to just make the change for change sake. I have not read a good reason to make the change outside because “we can”. Like it or not, *nix needs to stay Posix compliant. if you want to bastardize your own install to use something different, then more power to you. However, it is time to face the facts that Linux and Manjaro in particular is no longer just distro for developers and elite users. I personally know several are giving it a try for the gaming ability alone. Now if someone wants to make a solid reason why the change to zsh more than “because”, then i would entertain it. However, I have not heard any yet. Until then, bash it is. I can tell you right now, bash is ubiquitous on many unix os now. In fact, IBMi now has bash. I really do not care that Apple went to zsh. Apple is irrelevant to the conversation.

5 Likes

I am not trying to pick on you specifically since a lot of people in this topic have made similar statements but I don’t see how zsh is less POSIX-compliant than bash. They both add their own extensions which are not POSIX-compliant. They both can execute a POSIX-compliant script.

:man_shrugging:

At least bash has --posix
https://hyperpolyglot.org/unix-shells#arg-options

(for curious minds - also note the many other differences listed on that page)

1 Like

zsh goes into posix mode when it is invoked as sh.

1 Like

I voted for offering a choice, but I recognise that just adds to the complexity and stress for new users, so that might not be ideal.

Anyway I don’t have strong feelings for one or the other since I don’t use the terminal all that much, but I continue to use bash since that’s what I’m used to. If zsh remains being the default the next time I need to reinstall then I’ll probably just go with the flow and use it.

well… zsh states in the notes it isnt posix compliant. I dont use extensions, just normal bash. I also use it on rhel, AIX, IBMi, etc. You still havent told me why zsh over bash outside of cosmetics? I found zsh more complicated than i wanted. I spent about a week working with it and decided it wasnt worth my time. Since we are having a ton of new users from windows and other distros coming on, I still feel like you need to stay with 98% of the rest of the distros. Even WSL defaults to bash. I am just not impressed with zsh to make it the default over bash. Again, until you prove to me the REAL benefits of defaulting to zsh, then stay with bash as the default or let the user choose at install time. So far the only reason i have seen is “because I want to”.

5 Likes

No, it goes into strict Bourne shell mode, which is not the same thing as POSIX-compliance.


Exactly, yes. zsh’s own developers state that it isn’t POSIX-compatible, and that it doesn’t aim to be.

I voted for bash, because changing shells is not a thing a distro should be focused on imho. Providing good bash defaults - most likely, providing a nice fancy theme - maybe, but changing the entire shell? Definitely not. There’s no need to increase the amount of newb questions in support section in exchange to nothing. Devs and pros surely can make their switch with a couple of clicks, right?

I use fish btw. Therefore my question: why not fish then? :wink:
It’s a joke, there’s no such question.

3 Likes

For my use I see no advantage of ZSH over Bash. In my book it’s like adding Paru over Yay. New and shinny is seldom actually better. I end up removing Paru because of how it behaves in certain situations versus Yay. I would suggest Bash over ZSH or give a choice like suggested.

1 Like

While I am a zsh user, I don’t use powerline10k or ohmyzsh so I can’t really comment on the cosmetics.

I don’t think you will find me anywhere in this thread advocating for using zsh over bash. I only commented here because there were some really strange things being said, like the fact that “zsh doesn’t accept any functions inside its ~/.zshrc”.

Ultimately, I think it is a pointless debate. Which shell you use is entirely a personal preference. Debating if zsh or bash is a better choice is no different than debating if Cinnamon or Budgie is a better DE. It is unanswerable.

The idea that bash should be chosen because it is more common is also silly to me. If Linux distros made decisions based on that logic they would all be identical and Gnome would be the only DE available.

Ultimately, the distro developers need to decide what features they want by default to set their distro apart from others. If they think zsh or any other shell should be the default then we should support them in that.

The reality is that it doesn’t matter what the default shell is any more than it matters which software is installed by default. You have the choice to change your shell to whatever you want in the same way you have the choice to remove any pre-installed software that doesn’t match your personal preference.

8 Likes

As stated by more than one above for some switching the shell is a pain. I’m back on Bash, but I will bet bottom dollar for some more complicated things like the devs do I probably messed up something.

Can you explain that? Isn’t it as simple as:

chsh -s /bin/bash
3 Likes