Mac OS X Directory Structure explained
If you have ever looked at your Mac root directory and wondered what some of those other directories are for, you’re probably not alone. Mac OS got a whole lot more complex with the advent of Mac OS X, adapting a unix file structure that is largely unfamiliar to Mac OS 9 and Windows users. So just what is /System, /Library, /usr, and all the others for anyway?
Here you will find a brief overview of these directories, as well as an explanation of each system level directory as found in Mac OS X and macOS system software.
Directory Structures of Mac OS X, Examined and Explained
By default, if you glance in the root of your Mac’s hard disk from Finder, you’ll see some unfamiliar sounding directories. The underlying directory structures of Mac OS are best revealed by visiting the root directory of the Mac, which many Mac users may encounter when they visit their own “Macintosh HD”.
Going further from the command line, you will see even more root level directories if you type the following:
Here you will find directories with names like; cores, dev, etc, System, private, sbin, tmp, usr, var, etc, opt, net, home, Users, Applications, Volumes, bin, network, etc.
Rather than wonder at the mystery of what all these folders, directories, and items mean, let’s examine and detail what these directories are, and what they contain, as they are relevant to the Mac operating system.
In no particular order, here is a table to help with this effort of exploring the base system directory structure of Mac OS:
|/Applications||Self explanatory, this is where your Mac’s applications are kept|
|/Developer||The Developer directory appears only if you have installed Apple’s Developer Tools, and no surprise, contains developer related tools, documentation, and files.|
|/Library||Shared libraries, files necessary for the operating system to function properly, including settings, preferences, and other necessities (note: you also have a Libraries folder in your home directory, which holds files specific to that user).|
|/Network||largely self explanatory, network related devices, servers, libraries, etc|
|/System||System related files, libraries, preferences, critical for the proper function of Mac OS X|
|/Users||All user accounts on the machine and their accompanying unique files, settings, etc. Much like /home in Linux|
|/Volumes||Mounted devices and volumes, either virtual or real, such as hard disks, CD’s, DVD’s, DMG mounts, etc|
|/||Root directory, present on virtually all UNIX based file systems. Parent directory of all other files|
|/bin||Essential common binaries, holds files and programs needed to boot the operating system and run properly|
|/etc||Machine local system configuration, holds administrative, configuration, and other system files|
|/dev||Device files, all files that represent peripheral devices including keyboards, mice, trackpads, etc|
|/usr||Second major hierarchy, includes subdirectories that contain information, configuration files, and other essentials used by the operating system|
|/sbin||Essential system binaries, contains utilities for system administration|
|/tmp||Temporary files, caches, etc|
|/var||Variable data, contains files whose contents change as the operating system runs|
You may very well find other directories as well, depending on the version of Mac OS X you have, and depending on what apps and system adjustments you have made.
Nonetheless you can be sure that if any directory is at the root of Mac OS X, it is important, and shouldn’t be messed with at least without detailed knowledge of what you’re doing. Never delete, modify, or otherwise alter system files and directories on a Mac (at least without knowing exactly what you’re doing and why) because doing so can disrupt the operating system and prevent it from working as expected. Always back up a Mac before exploring and modifying system level directories.
If we forgot anything, or if something isn’t properly described, feel free to chime in with comments.