43

I learned recently (on Super User) that Mac OS X uses the bash shell. I also know that OS X has a UNIX core.

I was searching for information about OS X and Open Source on google, but what I found was this site which seems to include the source code for OS X.
For instance, one of the links reads: Mac OS X 10.5.7 Source

So, is OS X open source?

There's an Apple Public Source License, but I'm bad at understanding legalese.

Besides the kernel, What about the various other pieces? The X server? Window Manager? File explorer? etc. What's open source and what's not?

Giacomo1968
  • 58,727
hasen
  • 5,269

8 Answers8

47

Darwin is open source operation system from Apple and it's core of Mac OS X. But Darwin hasn't Mac OS X GUI.

  • Darwin is like Linux, FreeBSD, etc...
  • Mac OS X GUI is like KDE, GNome, etc...
MicTech
  • 10,496
23

Others have already explained that Darwin is open source. It's Mac OS X's kernel, similar to how Linux is the kernel of a Linux distro. Mac OS X's windowing system (called Quartz Compositor) is not open source.

You also ask about other open source parts of Mac OS X:

Besides the kernel, What about the various other pieces? The X server? Window Manager? File explorer? etc. What's open source and what's not?

One of the most prominent Apple open source projects is probably WebKit, which was originally a fork of KHTML and KJS. WebKit is used by a huge number of browsers.

Another Apple open source project you may have used even if you don't use Mac OS X is [Bonjour](http://en.wikipedia.org/wiki/Bonjour_(software)), Apple's implementation of Zeroconf.

Apple also owns CUPS, a printing system that is used by a number of operating systems.

Apple also has a number of other open source projects, such as a streaming server, and they contribute to many more open source projects, such as gcc. You'll find more at opensource.apple.com and Mac OS forge. In addition to that, Mac OS X ships with hundreds of open source components from Apache to ZFS, most of which are not owned or maintained by Apple.

LKM
  • 401
13

The kernel is open source; the user interface and all the applications that the OS comes with are not.

Apple does maintain some open source projects, but for the most part, everything besides the core kernel is closed source. For example, WebKit (the HTML rendering engine behind Safari, Chrome, and other browsers) is open source, but the Safari browser itself is not. Finder, Spotlight, and most (if not all) of the applications that come with the OS are closed source.

5

Yes and no.

Unix isn't open sourced, and these days it's a certification for a family of OSes that match the Unix common standards. There are also still OSes that have a heritage in the original Unix versions - Solaris and some of the BSDs for example. None of these are GNU licensed - most BSD variants are BSD licensed, and some versions of Solaris were under the CDDL.

OS X is based off bits of FreeBSD, as well as a micro kernel called L7, and Apple has chosen to keep the source of this open - since they have the option to close it off under the BSD license.

Here's all of Apple's open source components.

The Darwin Kernel (based off BSD) is here - while in theory it's possible to build an OS off it - see OpenDarwin and PureDarwin. I'd note both projects appear dead, and you would lack many of the desktop components like the desktop and so on.

As such, well, it's sort of open sourced, but not in the same way as Linux or BSD. You couldn't build a working system off Apple's code, but you could pull in some other things and do so if you didn't mind losing much of the Apple UI.

Edit - as of Feb 2013, there appears to be a new release of PureDarwin, which claims fairly major changes. I have no idea if this means the project is alive or not. I also became aware that Darwin was released in compiled form here, which may be a useful starting point for hacking your way around things.

Pang
  • 1,017
Journeyman Geek
  • 133,878
4

The Darwin OS, upon which OS X is based, is open source, as is the XNU kernel it uses. OS X's Aqua GUI is not open source, however. This effectively gives Apple the best of both worlds: they get an OS that has the stability and security of an open source, UNIX-like platform, while also having the profitability of a proprietary platform. This is like the McDonald's policy of giving you free water and charging you a quarter for the cup.

wbr
  • 41
3

Many parts of OSX are open source - Apple is an active corporate participant in the community. Apple publishes the open-source portions of their software here. However, due to the non-open parts, the system is not free.

David Phelan
  • 597
  • 2
  • 8
2

A few parts of OS X are open source (most notably the Darwin kernel), and it uses many open-source projects.

The "Mac OS X 10.5.7 Source" title is a bit misleading - the page lists all the open-source code used in OS X (such as Apache, Python, bash, etc)

Not much of what you probably consider "OS X" is open source - it's mostly underlying things (for example, the kernel, or the the SMB client/server used by the Windows-file-sharing feature)

dbr
  • 5,147
1

Classic Unix does not have a GNU license. Ultimately, some parts of MacOS are available to the public, but it isn't "open source" or "free" in any meaningful way.

Apple do use many Open Source components, in full compliance with their license, in the overall product.