Darwin is mostly POSIX-compatible, but has never, by itself, been certified as compatible with any version of POSIX. Starting with Leopard, macOS has been certified as compatible with the Single UNIX Specification version 3 (SUSv3).[7][8][9]
History
The heritage of Darwin began with Unix derivatives supplemented by aspects of NeXT's NeXTSTEP operating system (later, since version 4.0, known as OPENSTEP), first released in 1989. After Apple bought NeXT in 1996, it announced it would base its next operating system on OPENSTEP. This was developed into Rhapsody in 1997, Mac OS X Server 1.0 in 1999, Mac OS X Public Beta in 2000, and Mac OS X 10.0 in 2001.
Up to Darwin 8.0.1, released in April 2005, Apple released a binary installer (as an ISO image) after each major Mac OS X release that allowed one to install Darwin on PowerPC and Intel x86 systems as a standalone operating system.[12] Minor updates were released as packages that were installed separately. Darwin is now only available as source code. As of January 2023, Apple no longer mentions Darwin by name on its Open Source website and only publishes an incomplete collection of open-source projects relating to macOS and iOS.
The last bootable full release of Darwin supported 32-bit and 64-bit Apple PowerPC systems and 32-bit Intel PCs.[18]
Darwin currently includes support for the 64-bitx86-64 variant of the Intel x86processors used in Intel-based Macs and the 64-bit ARM processors used in the iPhone 5S and later, the 6th generation iPod Touch, the 5th generation iPad and later, the iPad Air family, the iPad Mini 2 and later, the iPad Pro family, the fourth generation and later Apple TVs, the HomePod family, and Macs with Apple silicon such as the 2020 Apple M1 Macs, as well as the Raspberry Pi 3B.[19][20] An open-source port of the XNU kernel exists that supports Darwin on Intel and AMD x86 platforms not officially supported by Apple, though it does not appear to have been updated since 2009.[21] An open-source port of the XNU kernel also exists for ARM platforms, though it has not been updated since 2016.[22] Older versions supported some or all of 32-bit PowerPC, 64-bit PowerPC, 32-bit x86, and 32-bit ARM.
It supports the POSIX API by way of its BSD lineage (largely FreeBSDuserland), so a large number of programs written for various other UNIX-like systems can be compiled on Darwin with no changes to the source code.
Darwin does not include many of the defining elements of macOS, such as the Carbon and Cocoa APIs or the Quartz Compositor and Aqua user interface, and thus cannot run Mac applications. It does, however, support a number of lesser-known features of macOS, such as mDNSResponder, which is the multicastDNS responder and a core component of the Bonjour networking technology, and launchd, an advanced service managementframework.
The following is a table of major Darwin releases with their dates of release and their derivative operating system releases.[25] Note that the corresponding releases may have been released on a different date.
Darwin 0–8 and corresponding Mac OS X releases
Version
Date
Corresponding releases
Notes
0.1
March 16, 1999
Mac OS X Server 1.0 releases
Initial release
0.1 is contrived (for sorting and identification) as this identified itself simply as Rhapsody 5.3
Commands such as cp and mv updated to preserve extended attributes and resource forks[29]
8.11
November 14, 2007
Mac OS X v10.4.11
The jump in version numbers from Darwin 1.4.1 to 5.1 with the release of Mac OS X v10.1.1 was designed to tie Darwin to the Mac OS X version and build numbering system, which in turn is inherited from NeXTSTEP. In the build numbering system of macOS, every version has a unique beginning build number, which identifies what whole version of macOS it is part of. Mac OS X v10.0 had build numbers starting with 4, 10.1 had build numbers starting with 5, and so forth (earlier build numbers represented developer releases).[30]
Server Message Block version 2 (SMB2) is now the default protocol for sharing files instead of AFP. This is to increase performance and cross-platform compatibility.
IPoTB (Internet Protocol over Thunderbolt Bridge).
System Integrity Protection. Protects certain system parts from being modified or tampered with by a process even if run by root or by a user with root privileges.
sudo is configured with the "tty_tickets" flag by default, restricting the session timeout to the terminal session (such as a window or tab) in which the user authenticated the program.
macOS v10.12.0 and iOS 10.0.1 (initial release version)
OS X was rebranded into macOS.
Writing to /Volumes directory is now restricted to root user or any user with root privileges
System Integrity Protection now covers /Library/Application Support/com.apple.TCC directory that contains a list of applications that are allowed to "control the computer"
APFS replaces HFS+ as the default filesystem for boot partition in macOS on Macs with flash storage. On Macs with HDDs, the boot partition must be reformatted to use APFS.
ntpd replaced by timed as a time synchronization service
System Extensions replace Kexts and runs in userspace, outside of the kernel.[34]
DriverKit replaces I/O Kit. It Introduces "Dexts" (Driver Extensions) which are built using DriverKit. Driverkit is a new SDK with all new frameworks based on IOKit, but is updated and modernized. Device Drivers run in userspace, outside of the kernel.[35][36][37]
Note: the tables above contain the release dates of the corresponding OS releases. Build dates for Darwin versions are not publicly available; the commands below only give the build date for the XNU kernel.
The command uname -r in Terminal will show the Darwin version number ("20.3.0"), and the command uname -v will show the XNU build version string, which includes the Darwin version number.
The command sw_vers will show the corresponding ProductName ("macOS"), the ProductVersion number ("11.2.3") and the BuildVersion string ("20D91").
Derived projects
Due to the free software nature of Darwin, there have been projects that aim to modify or enhance the operating system.
OpenDarwin
OpenDarwin was a community-led operating system based on the Darwin system. It was founded in April 2002 by Apple Inc. and Internet Systems Consortium. Its goal was to increase collaboration between Apple developers and the free software community. Apple benefited from the project because improvements to OpenDarwin would be incorporated into Darwin releases; and the free/open-source community benefited from being given complete control over its own operating system, which could then be used in free software distributions such as GNU-Darwin.[38]
On July 25, 2006, the OpenDarwin team announced that the project was shutting down, as they felt OpenDarwin had "become a mere hosting facility for Mac OS X related projects", and that the efforts to create a standalone Darwin operating system had failed.[39] They also state: "Availability of sources, interaction with Apple representatives, difficulty building and tracking sources, and a lack of interest from the community have all contributed to this."[40] The last stable release was version 7.2.1, released on July 16, 2004.[41]
PureDarwin
PureDarwin is a project to create a bootable operating system image from Apple's released source code for Darwin.[42] Since the halt of OpenDarwin and the release of bootable images since Darwin 8.x, it has been increasingly difficult to create a full operating system as many components became closed source. In 2015 the project created a preview release based on Darwin 9 with an X11 GUI,[43] followed by a command-line only 17.4 Beta based on Darwin 17.[44]
MacPorts (formerly DarwinPorts), Fink, and Homebrew are projects to port UNIX programs to the Darwin operating system and provide package management. In addition, several standard UNIX package managers—such as RPM, pkgsrc, and Portage—have Darwin ports. Some of these operate in their own namespace so as not to interfere with the base system.
GNU-Darwin was a project that ports packages of free software to Darwin. They package OS images in a way similar to a Linux distribution.
The Darling project is a compatibility layer for running macOS binaries on Linux systems. It uses some Darwin source code.[48]
There are various projects that focus on driver support: e.g., wireless drivers,[49][50] wired NIC drivers[51][52][53] modem drivers,[54] card readers,[55] and the ext2 and ext3 file systems.[56][57]
DarwinBSD Project is a Darwin project using pkgsrc for packages. It is an open source project.[58]
^"Mac OS X Leopard - Technology - UNIX". Leopard Technology Overview. Apple Inc. Archived from the original on December 27, 2008. Leopard is now an Open Brand UNIX 03 Registered Product, conforming to the SUSv3 and POSIX 1003.1 specifications for the C API, Shell Utilities, and Threads.
^yuriwho (May 5, 2002). "WirelessDriver Home Page". Wirelessdriver.sourceforge.net. Archived from the original on July 28, 2020. Retrieved July 12, 2010.