4 ms·
Apple replaces bash with zsh as the default shell in macOS Catalina
- _bxg1 7y agoI'm not familiar with zsh. Can someone explain the implications of this? Will it, for example, disrupt the sharing of scripts with peers on Linux machines?
- Fiahil 7y agoIf you put a shebang in your shell scripts, then you have nothing to worry about.
- _bxg1 7y agoExcept the article suggested they might remove bash from macOS altogether at some point, which would make that a pain
- rootbear 7y agoThat would be unfortunate, and would probably require /bin/bash to be a symlink to either /bin/zsh or /bin/sh to prevent many scripts from failing. For portability reasons, I always use #!/bin/sh unless I actually use some bash feature(s), but a lot of scripts explicitly invoke bash even when they don't have to.
- the_jeremy 7y agoThey already are stuck at some version of Bash that's been out of date for almost a decade because Bash changed its licensing on the newer releases.
- _bxg1 7y agoRight, but some of us care more about cross-compatibility in our shell than shiny new features
- burke 7y agoIn my experience, unless you extensively customize bash, you won’t notice the change except to be pleasantly surprised by a few bits nicer UI. At the poweruser end, zsh is more configurable and dramatically nicer to configure (and documented a bit better). For the most part, bash scripts work without modification in zsh.
- muro 7y agoSome Linux distributions already use "dash" instead of "bash", though dash is much more compatible. Edit: debian does it. More info: https://wiki.archlinux.org/index.php/Dash https://wiki.archlinux.org/index.php/Dash
- NathanOsullivan 7y agoIt's worth pointing out they use dash for scripts that do not explicitly require bash . The default interactive shell is still bash