Hacker News new | ask | show | jobs
by petre 444 days ago
MacOS userspace was forked from FreeBSD, that's why it bundles non-GNU extensions. Also the FreeBSD userspace has since then incorporated GNUisms.

Why they went with Bash 2 as the defualt shell is beyond me. I always switched to and used Zsh which had a more recent version. Now I'm also using it on Linux and FreeBSD, because I want a consistent shell.

2 comments

The macOS userspace was never forked from FreeBSD or any other BSD. If anything, it was forked from NextSTEP. In actual practice, it is a collection of individual components taken from a variety of sources. When development of Mac OS X began in 1999, most command-line tools and a large part of libc were derived from either NetBSD or OpenBSD via NextSTEP. Over the years, there has been a shift toward FreeBSD. Apple maintain a collection of GitHub repositories of their Open Source components where you can see the evolution from one release to the next. Most of them have XML metadata indicating the origin of each individual component.
Apple no longer ships bash 2. They moved to zsh also a few years ago.

The reason was the same as here: bash moved to GPL v3.

Incorrect. They default to zsh for interactive use, but their /bin/sh is bash 2. They also ship a copy of dash, but it's not sufficiently POSIX-conforming to replace bash.
Huh weird, I remember many years ago getting a notification in the terminal that bash would be deprecated so I assumed that would have happened by now. I no longer use macs so I wasn't up to date, sorry.