Sub topic 4
How folders nest: the Home folder and beyond
This chapter assumes you can open Finder windows, double-click folders, and know what a file and a folder are. It explains how the Mac stores folders inside folders. It also covers where your own files live and how to see your position in the hierarchy at any moment.
Folders form a tree
Every file on a Mac sits inside a folder. That folder sits inside another folder, and so on up to a single starting point called the root. Because there is one root and every item has exactly one parent folder, the structure is a tree.
The location of an item is its path: the list of folders you pass through to reach it, from the top down. In Terminal, folder names are separated by /. For example, /Users/sam/Documents/Budget.numbers means: from the root, open Users, then sam, then Documents, then find Budget.numbers.
A path that starts at the root with / is an absolute path. It always points to the same place. A path that starts from your current folder is a relative path. Its meaning depends on where you are.
The top levels of the Mac
In the Finder, the root appears as your startup disk, usually named Macintosh HD. Open it and you see a few top-level folders:
| Folder | What it holds | Should you store files here? |
|---|---|---|
| Users | One folder per user account, plus Shared | Yes, but only in your own Home folder |
| Applications | Apps available to every user | No. Install apps, don't file documents here |
| Library | System-wide support files for apps and macOS | No |
| System | macOS itself | No. It is protected |
Some details depend on your macOS version. Since macOS Catalina, the startup disk is split into two volumes: a read-only system volume and a data volume that holds your files. The Finder presents them as one disk, so you rarely notice the split. The protection on System is the reason: even an administrator can't casually change it.
External drives, USB sticks and network shares appear as separate volumes. Each is its own tree. In Terminal they are listed under /Volumes. In the Finder they show in the sidebar under Locations, and on the desktop if you enable that in Finder settings.
Your Home folder
When you create a user account, macOS creates a Home folder for it at /Users/<short name>. The short name is the account name chosen at setup. In the Finder, the Home folder shows as a house icon in the sidebar, labelled with that name. Press Shift-Command-H to open it from anywhere.
The Home folder is the one place on the Mac where you are meant to keep your own work. It contains these standard folders:
- Desktop: what you see on the desktop background.
- Documents: the default place for saved documents.
- Downloads: where browsers and AirDrop usually put incoming files.
- Movies, Music, Pictures: default homes for media apps.
- Public: a folder other users on the Mac, or on your network, can read.
- Library: per-user app settings, caches and data. It is hidden by default.
Other user accounts can't normally open your Home folder. The shared exception is /Users/Shared, a folder any account can read and write.
Two consequences follow. First, a backup of your Home folder captures nearly everything that is yours. Second, a new folder you create for your own use belongs inside Home, not at the top of Macintosh HD, where it could be blocked by permissions or lost during a macOS reinstall or migration.
Seeing where you are
The Finder window title shows only the current folder's name. Two features show the full chain:
- Path Bar. Choose View > Show Path Bar. A strip at the bottom of the window shows every ancestor folder. Double-click any of them to jump there.
- Title menu. Hold Command and click the folder name in the title bar. A menu lists the parents, top to bottom.
To move through the tree with the keyboard, use these shortcuts:
- Command-Up Arrow opens the enclosing (parent) folder.
- Command-Down Arrow opens the selected folder.
- Shift-Command-H opens Home.
- Shift-Command-C opens the Computer view, which lists your disks.
The same movement in Terminal looks like this. Replace sam with your short name in the comments. Your output will differ.
echo ~ # prints /Users/sam, the Home folder
cd ~/Documents # move into Documents
pwd # prints /Users/sam/Documents
cd .. # ".." means the parent folder
pwd # prints /Users/sam
ls ~ # lists Desktop, Documents, Downloads and so onThe ~ symbol is shorthand for your Home folder. The Terminal expands it before the command runs.
Edge cases to know
- The Library folder is hidden. To open it for one visit, hold Option and choose Go > Library. You can also press Shift-Command-Period to reveal hidden items in the current window. Hidden files get a full treatment in a later chapter.
- There are several Library folders.
/Libraryserves all users,~/Libraryserves you, and/System/Librarybelongs to macOS. Delete things in the first two only if you know what they are. - Names with spaces need care in Terminal.
cd ~/Documents/Tax Returnsfails. Writecd ~/Documents/"Tax Returns"or escape the space with a backslash. - Same name, different place. Two files called
Notes.txtcan coexist if they sit in different folders, because the full path is what makes an item unique. - Cloud-synced folders. If you turn on Desktop & Documents in iCloud Drive, those two folders are stored and synced through iCloud. They still behave as your Desktop and Documents, but they may show up under iCloud Drive in the sidebar. A later chapter covers this.
- Depth has a cost. Very deep nesting, such as ten levels, makes paths long and hard to browse. A later chapter covers how deep to go.
Putting it into practice
Open a Finder window and turn on the Path Bar. Press Shift-Command-H, open Documents, then press Command-Up Arrow. Watch the Path Bar change each time. Doing this a few times builds the habit of reading your position in the tree, which makes the next steps, creating folders and moving items, much less error-prone.
Exercise
You are in the folder /Users/sam/Documents/Projects in a Finder window. Name two ways to see the full path, and give the keyboard shortcut that takes you to the Home folder.
Show answer
Choose View > Show Path Bar to see every parent folder at the bottom of the window, or Command-click the folder name in the title bar to see a menu of parent folders. Shift-Command-H opens the Home folder, here /Users/sam.
Exercise
A colleague tells you to put a new project folder at the top level of Macintosh HD so everyone can find it. Why is this usually a poor choice for your own files, and where should the folder go instead?
Show answer
Top-level folders can need administrator permission to change, and they are not part of your Home folder, so they may be missed by backups of Home and by migrations. Put the folder inside your Home folder, for example in Documents. If other accounts on the Mac need access, use /Users/Shared.