Techno Darwin Mac OS
Versioning software is a surprisingly difficult task. The version number conveys technical information: how much change can you expect and might it break existing workflows and data? Users will be more willing to pay for a major upgrade with new features, so the version number is used as a marketing tool. But for developers and MacAdmins, the version number has to be as granular as possible, ideally with a different number for each build made.
The Darwin Version is number that is increased on every major release of macOS. Mac OS X 10.2 Jaguar was the first release of Mac OS X to consistently report its Darwin Version as 6. From that you can conclude that 10.0 had Darwin version 4 which makes sense, because it was the fourth release of NextSTEP, the operating system Mac OS X is based on. A downloadable game for Windows, macOS, Linux, and Android. Dwarf City is overrun by evil goblins. Either download the webGL build and run the index.html file with any recent web browser or run the Mac app version. TechnoDarwinMac.app.zip 19 MB. TechnoDarwinWebGL.zip 6 MB.
Open Source Development. Documentation and resources for Bonjour, Java, UNIX, and WebKit. Open development of select macOS projects Tools and Technologies. Why you'll love to develop on your Mac Open Source in macOS. Learn about the 200+ open source projects that ship with macOS Darwin Technologies. We would like to show you a description here but the site won’t allow us.
Because of these, sometimes opposing, interests, it is no wonder that versioning is often a problem for MacAdmins.
A brief history of the Mac operating system versions
Before the “Mac OS” label, the Macintosh operating system was called “System 7.” “Mac OS 8”, code-named “Copland,” was supposed to be the new operating system with all the new features, but the project kept slipping and then was cancelled. The “System 7.7” update was then re-named “Mac OS 8” to get Apple out of some third party licensing deals, which were set to expire on version 8. Marketing and legal matters decided the versioning here. (But it wasn’t all just marketing: Mac OS 8 also got the new interface design that had been created for Copland.)
When Apple announced the NextSTEP based major overhaul for the Macintosh in the late nineties, they chose to not give it a different name and new version numbers. Instead they chose to label the new system as “Mac OS X”, where the “X” was read as the roman numeral ten. I assume this was a marketing choice to demonstrate continuity with the previous versions, which had been “Mac OS 8” and “Mac OS 9.”
The first version of Mac OS X had the numerical version number 10.0.0
and got four “updates” to 10.0.4
Then it got the first major “upgrade” to 10.1
. This broke with conventional versioning as major upgrades should get a new major number. When “Mac OS X 10.2 Jaguar” was announced at WWDC in 2002, it was obvious that Apple now considered “Mac OS X” a brand and would stick to the 10
in the system version numbers.
With the “Xserve,” the ‘X’ became a moniker to represent Apple’s “professional” or “EXpert” hardware and distinguish them from the ‘i’ prefix used for the consumer friendly devices and software. (iMac, iBook, iPod, iTunes, iMovie, iPhoto, etc.) Later “pro” software tools, such as “Xcode,” “Xsan,” and “Xgrid” picked up that prefix. Confusingly, the leading “X” was pronounced ‘ecks’ and the trailing ‘X’ in “Mac OS X” was still pronounced as ‘ten.’ Or at least that was what Apple marketing insisted it should be called.
In 2012, Apple dropped the “Mac” from the operating system for “OS X Mountain Lion” (10.8) The “X” represented the “pro” nature of Mac platform, as opposed to “iOS” for iPhone and iPad. Apparently, the “X” was considered a stronger brand for “pro” than “Mac” at the time…
This changed when Apple finally dropped the “X-as-ten” and returned the “Mac” with “macOS Sierra” (10.12) in 2016.
Even without the “X” in the system name, the ‘10’ has remained in the version number up to macOS 10.15 Catalina.
(The “X-as-ten” lives on with “Final Cut Pro X” and “Logic Pro X”. The prefix “X” lives on with “Xcode.”)
Big Sur goes to 11
The naming and versioning of the Mac platforms operating system was largely driven by symbolism, marketing and even legal matters. The same is true this year: Apple has finally given up on the “ten” and will raise the major version of macOS to 11.
I have a post on my opinion and reaction to macOS 11. Whatever the reasons, this is the year that we will get macOS 11.
When you go to “About this Mac” on a Mac running the Big Sur beta, it will proudly announce that it is running macOS 11.0. You get the same result when you run sw_vers
:
This seems easy enough, however, there is a catch to this.
10.16 vs 11.0
Big Sur will not always report 11.0
as the macOS version. It might report 10.16
in some cases. These cases are meant for situations where software might just check the second part of the version for version checks.
The rules are detailed in this post from Howard Oakley.
In Big Sur you can force the compatibility mode by setting the SYSTEM_VERSION_COMPAT
environment variable to 1
:
Mac Os Darwin
Checking the Version
When you have a script that checked the version of macOS (or Mac OS X or OS X), so far it was safe to ignore the first number of the product version and only compare the second. For example to see if macOS was Mojave or newer, you probably would have done something like this:
Now, with the release of macOS 11.0, this setup will return 0
for the minorVersion
and fail.
The obvious solution here would be to extract the majorVersion
as well and compare that first:
This will work well enough, even when the script runs in a setup where it might get 10.16
as the version number. But is not particularly nice to read. Also, when you want to compare update versions, these will be (presumably) the minorVersion
for Big Sur and later and the third part of the version number in Catalina and earlier and things will get even more messy quickly.
Maybe there is a better way of doing this than using the product (marketing) version of macOS?
Build Version
As I mentioned earlier, the user visible version may not be granular enough for the needs of developers. And because of this macOS has a second version, called the “build version”
The build version for the current version of macOS Catalina as I am writing this is 19G2021
.
You can also see the build version in the “About this Mac” window when you click on the version number.
The build version consists of three parts and a fourth optional one. The first number is the Darwin Version. The following capital letter designates the update. The following number (up to four digits) is the specific build number. Sometimes the build number is followed by a lower case letter.
Darwin Version
This part of the version takes its name from the Darwin core of macOS.
The Darwin Version is number that is increased on every major release of macOS. Mac OS X 10.2 Jaguar was the first release of Mac OS X to consistently report its Darwin Version as 6
. From that you can conclude that 10.0 had Darwin version 4
which makes sense, because it was the fourth release of NextSTEP, the operating system Mac OS X is based on.
macOS 10.15 Catalina, has a Darwin version of 19
and Big Sur reports 20
.
You can also get the Darwin version in the shell from the OSTYPE
environment variable:
But keep in mind that environment variable may not be set depending on the context your script runs in.
A safer way to get the Darwin version is with the uname
command:
This Darwin version includes the update information.
Updates
In the build version updates are tracked with a capital letter. The letter A
stands for the .0
or first release of a major version. B
signifies the second release or first update or .1
release, and so on.
The current Catalina build version starts with 19G
so we know it is the seventh release or sixth update to Catalina (10.15.6). The current Big Sur beta starts with 20A
so it is the first release or .0
version.
Build numbers
The significance of the build number is most often seen during the beta phase. While the Darwin version and update letter are fixed during the beta phase, the build number increases with every beta release. This is the most granular number we have to determine the version.
For each update and major release the build number starts over, so it can only be used to compare releases for the same major release and update version.
Traditionally, there was a difference between two- and three-digit build numbers and four-digit build numbers. The builds with lower numbers of digits were general release builds, that will run on all Macs that support this version of macOS. The four digit build numbers designated either a security update or a hardware specific build.
Hardware specific builds occur when a new Mac model is released. These usually get a hardware specific build of macOS, since the drivers necessary for the new hardware are not included in the current general release version. Even though the product version numbers of macOS are the same for the general release and the hardware specific release, they have different build numbers.
Usually, the hardware specific drivers are merged into the general release on the next update. However, until the builds are merged, MacAdmins may have to manage hardware specific system installers and workflows for new hardware. This was especially annoying with the release of the 2018 MacBook Pro which had a specific build of 10.13.6 that was never merged into the general 10.13 build. MacAdmins that wanted or needed to support 10.13 had to manage a separate installer for these MacBooks.
Intruigingly, the Big Sur beta is different: its build number started in the 4000s and switched to the 5000s with beta 3.
Special builds
Some releases of macOS have a trailing lower case letter after the build number. This is particularly common during the beta phase. It is unclear what this letter designates exactly. It might designate that the installer application was re-built one or more times.
You can use regular expressions to parse out all the individual pieces of the build version:
But in most cases, you will not need this level of detail.
Using the Build Version
The build version provides a way to compare macOS system versions that is not subject to the whims of marketing. We can even use it distinguish hardware specific builds of macOS from general versions or determine if security or supplemental updates have been applied.
For most comparisons, we only need the Darwin version and maybe the update.
The Darwin version has had two digits since Mac OS X 10.6 Snow Leopard. It is safe to assume that you won’t be managing Macs running 10.5 Leopard any more. (And if you do, they will probably be “hand-fed” and not subject to your deployment and update automations.) Assuming a two digit Darwin version, we can use string comparison to compare build versions:
Since all versions of Mojave start with 18A...
they are all alphabetically greater than 18
. The same would go if you want to check for a maximum macOS version:
You can also filter for specific minimum updates:
By using the build version, we are avoiding all the trouble that the “marketing-driven” build version brings with it.
zsh solution
The above works for sh, bash and zsh scripts. However, when you are using zsh, there is another useful solution. zsh provides a function to compare versions called is-at-least
.
When you use zsh in the Terminal interactively, it is probably already loaded, but when you want to use it in scripts, you should use autoload
to make sure it is loaded. Then you can use is-at-least
this way:
Since both 11.0
and 10.16
are higher than 10.14
this will work no matter what number Big Sur might be reporting, but if you want to check that the system is Big Sur, you want to use 10.16
as the minimum, which covers both possible values:
Conclusion
The change of the version number in macOS 11 Big Sur might affect or even break some of your system version checking in your deployment and management scripts. There are some nice and easy solutions that are more resilient to changes in the “marketing” product version.
Home > Articles > Apple > Operating Systems
␡- The Layers of Mac OS X: Aqua
This chapter is from the book
This chapter is from the book
There is more than one way to think about dividing up a pizza. First, there is the familiar method of dividing it into slices. Alternatively, you could divide it into layers: topping, cheese, sauce, crust. Theoretically, you could also divide it into its basic ingredients: flour, water, tomatoes, garlic, milk. Each method makes a different contribution to your enjoyment of the pizza. The first method (slices) is best when you're getting ready to eat the pizza; the second is best when you are deciding what to order (such as pepperoni with extra cheese); the third is best if you are concerned about nutrition (needing to know the exact ingredients to calculate calories).
The same is true for Mac OS X. There are multiple ways to look at it and take it apart. Each way makes its own contribution to your understanding of the OS. In this chapter, I look at the major ways to 'take apart' Mac OS X. Having at least a minimal knowledge of Mac OS 9 will help, as I occasionally make comparisons between the two OS versions. But even if you've never used Mac OS 9, you'll be able to follow along.
In This Chapter
The Layers of Mac OS X: Aqua
The Layers of Mac OS X: Application Environments
Cocoa
Carbon
Classic
Java
Putting it together
The Layers of Mac OS X: Graphics Services
Quartz
Multimedia: OpenGL and QuickTime
The Layers of Mac OS X: Darwin
Mach
BSD (Unix)
Domains: An Overview
System domain
Local domain
User domain
Network domain
The Libraries of Mac OS X: /System/Library
Core Services
CFMSupport
Extensions
Fonts
Frameworks
PreferencePanes
Printers
QuickTime
ScreenSavers
Services
Sounds
StartupItems
The Libraries of Mac OS X: /Library
Application Support
ColorSync
Contextual Menu Items
Desktop Pictures
Documentation
Fonts
Internet Plug-Ins
Modem Scripts
Preferences
Printers
Receipts
StartupItems
The Libraries of Mac OS X: Users/'Home'/Library
Darwin Mac Os X
Application Support
Caches
Favorites
Font Collections
Fonts
Internet Search Sites
Keychains
Preference Panes
Preferences
Application-specific folders
Fonts in Mac OS X: Font Formats
TrueType fonts
PostScript fonts
OpenType fonts
Bitmap fonts
Identifying font formats
Fonts in Mac OS X: Working with Fonts
Font Panel window
Font smoothing and Mac OS X
International language support: basics
International language support: troubleshooting
Font utilities
The Layers of Mac OS X: Aqua
Darwin Os Download
Aqua is the name given to what most users think of when they think of Mac OS X: the user interface, the Finder, the Dock, the windows, the translucent buttons, the high-resolution icons, the menus, and all the rest. Many users may never explore Mac OS X beyond its Aqua layer.
From this perspective, a user upgrading from Mac OS 9 will feel quite at home, at least initially. Much still works the same way. You still double-click icons in the Finder to launch them; you still choose the Save command from an application's File menu to save a document; you still open a folder icon to see its contents.
But you will soon notice some significant differences: a new column view, a very different Apple menu, the Dock. I discussed the basics in Chapter 3, when I presented an overview of Mac OS X.