MobDojoStart learning free

Mac Inside & Out · macOS Under the Hood · Lesson 1 of 5

How macOS Is Built

Meet the Unix roots, the kernel, app bundles and Library folders.

9 min50 XPFree lab

Unix roots and the kernel

Your Mac looks friendly on the outside, with the Dock, Finder and bright icons. Underneath, it runs on ideas that are more than 50 years old.

An operating system is the main program that runs the whole computer. macOS is one. Windows is another.

Unix is an older family of operating systems, first built at Bell Labs around 1969. It was made to be steady, to run many programs at once, and to keep each person's files apart.

macOS grew out of that family. Its core is called Darwin, an open source base that Apple builds on. Open source means anyone can read the code. Apple then adds the parts you see, like Finder and the Dock.

At the very center of Darwin sits the kernel. The kernel is the boss program that talks to the hardware. It decides which app gets the processor, hands out memory, and controls the disk, keyboard and screen.

Apps don't touch the hardware themselves. They ask the kernel, and the kernel says yes or no. That's one reason a single crashed app usually doesn't bring down the whole Mac.

Unix also gave macOS its idea of users. Every file has an owner and rules about who may read or change it. You met standard and admin accounts earlier. When your Mac asks for your password before a big change, that's the same idea at work.

On Windows, the core comes from a different family called Windows NT, which didn't grow out of Unix.

Apps that are really folders

Open the Applications folder in Finder and you'll see icons like Safari or Calculator. Each one looks like a single file. It's really a folder.

A bundle is a folder that macOS shows as one item. An app whose name ends in .app is a bundle. Inside are the program, its pictures, its sounds and its settings files, all kept together.

You can peek inside. In Applications, Control-click an app and choose Show Package Contents. A folder called Contents appears. Look all you like, but don't change or delete anything there, or the app may stop working.

Because an app is one tidy bundle, many Mac apps install by dragging them into Applications. On Windows, apps usually use an installer and spread their files across several places.

Apps also keep files outside the bundle, in Library folders. A Library folder holds settings, caches and support files. A cache is a stash of saved copies that helps an app load faster. There are three main ones:

Files left behind by deleted apps often sit in your Library. If you don't know what something is, leave it alone.

Test yourself

Can you answer these?

  1. What is the name of the boss program at the center of macOS that hands out memory and talks to the hardware? (one word)
  2. You Control-click the Maps app and choose Show Package Contents. What do you find?

Answer them in the app to earn 50 XP.

Answer in the app