Live data from Hacker News

Use zsh as the default shell on your Mac

support.apple.com

41–50 of 252 posts

Re: Use zsh as the default shell on your Mac

#42

I still fondly remember when tcsh was the default shell. Like a real BSD Unix.

It's still in there. The linked article tells how to do it. In Terminal, enter $ chsh -s path, where path is one of the shell paths listed in /etc/shells, such as /bin/zsh, /bin/bash, /bin/csh, /bin/dash, /bin/ksh, /bin/sh, or /bin/tcsh.

And you can use MacPorts or (presumably) Homebrew to install newer versions of tcsh or pretty much any other shell you might want.

I personally never stopped using tcsh after the bash switchover since it's what I knew and what my dotfiles were already written in, and I'll most likely just keep using it in Catalina too.

Re: Use zsh as the default shell on your Mac

#44

zsh is better than bash in nearly all aspects, at least in my use cases, so this is a great news for me. Is there anything that can be done in bash but not in zsh?

I've been using zsh on Linux for years (4 at least). I was creating a function that I wanted to run in zsh and bash and I think I ran into some option that was available on a builtin command in bash that wasn't on the zsh version. I can't remember the details though, because it was a while ago. I imagine if someone deals with shell scripts more regularly than I do they would run in to those kind of problems more than me.

Re: Use zsh as the default shell on your Mac

#45

For those wondering why Apple is allergic to GPLv3 code: there is a clause in the license requiring you provide a way to run modified version of the software which would require Apple to let users self sign executables.

Sorry, how is that a problem? Users can build and execute code on their own Mac with XCode.

I don't really understand the licensing issues that well, but if what the poster above you said is true, I wouldn't really want to have to sign software that ships with my computer when it should just run out of the box.

Re: Use zsh as the default shell on your Mac

#46

For those wondering why Apple is allergic to GPLv3 code: there is a clause in the license requiring you provide a way to run modified version of the software which would require Apple to let users self sign executables.

So, Homebrew?

You can't tell me that Microsoft is able to ship entire distribution's userlands (Debian, Ubuntu, SUSE, and more) through the Windows Store, including all their GPL3 components, and Apple can't figure out how to ship an updated version of base64.

If I'm grumbling, it's just because making devops/CI scripts work on Windows and Linux is easier than MacOS and Linux these days because my colleagues run into issues like "base64" or "uuidgen" having different arguments in the extremely dated MacOS userland, and they then have to brew install a bunch of isolated components.

Re: Use zsh as the default shell on your Mac

#47

For those wondering why Apple is allergic to GPLv3 code: there is a clause in the license requiring you provide a way to run modified version of the software which would require Apple to let users self sign executables.

Sorry, how is that a problem? Users can build and execute code on their own Mac with XCode.

Perhaps Apple's vision for the future is one where you can't do that (ex: App Notarization seems to have us heading in that direction.)

Re: Use zsh as the default shell on your Mac

#48

Earlier quoted context omitted.

Sorry, how is that a problem? Users can build and execute code on their own Mac with XCode.

I don't really understand the licensing issues that well, but if what the poster above you said is true, I wouldn't really want to have to sign software that ships with my computer when it should just run out of the box.

I don't understand why GPLv3 would be a problem on macOS.

On macOS, you can run anything out of the box (depending on security/gatekeeper settings) and you can replace or modify system executables (such as /bin/bash) if you turn off SIP (which is slightly tricky to do but can be done from recovery mode.)

Running your own customized /usr/local/bin/bash is easy of course, and package managers like MacPorts or Brew make it simple to install various shells including the latest bash.

On iOS, however, there might be an issue, as you have to sign executables with XCode, but unfortunately Apple reduced free developer provisioning profiles from one year down to two weeks in order to block third-party app stores and malware, and to get more people to sign up for the paid developer program. Moreover, there is also no Apple-sanctioned way to modify system executables that I am aware of.

Re: Use zsh as the default shell on your Mac

#50

Earlier quoted context omitted.

Sorry, how is that a problem? Users can build and execute code on their own Mac with XCode.

I don't really understand the licensing issues that well, but if what the poster above you said is true, I wouldn't really want to have to sign software that ships with my computer when it should just run out of the box.

I don't think the prior poster is suggesting that you would have to sign existing software.

I believe that they are suggesting that Apple would be required to let you sign your own software if you do choose and give owners the right to opt to have their os trust software they OR Apple signed.

There is something that was addressed in the gpl community called tivoization.

Tivos dvrs were Linux boxes wherein they shared their source technically complying with the letter of the gpl but in fact locking them down so users couldn't modify the devices violating to many peoples mind the spirit and clearly expressed intent of the license.

This is if I understand correctly dealt with in gpl 3 which is what I think the poster is talking about.

Apple ios devices are non free in the same fashion as Tivos which is incompatible with gpl3

Post reply on HN