4 Ways to Quickly Access the Root Directory in Mac OS X
Like other forms of unix, the root directory of Mac OS X is simply /, but from the Finder it also takes the name of your primary hard drive. By default that is “Macintosh HD”, and newer versions of OS X have started to hide the root folder from users because most users simply don’t need to access the root subdirectories. If you renamed Macintosh HD to something else, you’ll need to replace your name throughout the walkthrough here when necessary.
1: Use the Go To Folder Keyboard Shortcut
Go To Folder is easily one of the most useful keyboard shortcuts in the OS X Finder since you can jump anywhere instantly, and the root directory is no exception:
- Anywhere on the Mac desktop, hit Command+Shift+G, then type / and hit return to jump to root (Macintosh HD)
If you don’t need frequent access to the root directory, using the keyboard shortcut may make the most sense. Additionally, using the generic / path will always go to the root directory, even if someone renamed “Macintosh HD” to something else, making it universal across all Macs.
2. Drag & Drop “Macintosh HD” into the Finder Sidebar
Placing Macintosh HD into the Finder Sidebar Favorites list provides for frequent quick access and drag & drop support:
- Open a Finder window to any folder other than ‘All My Files’ and click on the titlebar, pulling all the way down to the computer name
- Drag “Macintosh HD” into the Finder sidebar
Now clicking on Macintosh HD will jump instantly to the root directory.
3: Show Hard Disks on the Desktop to Reveal “Macintosh HD”
For those who can manage to keep their desktops clutter-free, having constant quick access to root is possible by showing hard disks on the desktop:
- From anywhere in the Finder, pull down the Finder menu and choose “Preferences”
- Under the “General” tab check the box next to “Hard disks” to immediately show Macintosh HD (and any other connected hard drive)
Showing hard drives on the desktop was actually default behavior prior to the most recent versions of OS X, but most users never leave their home directory for file access and so that became the new Finder window default instead, before finally leading to “All My Files” in the newest versions of Finder.
4: Get to / by Command Line
Anyone coming from a unix background will find this one obvious, but root directory access is always possible by using the cd command:
Another option is to use the command line and open to bring the root directory into the GUI through Finder:
Subdirectories can also be launched through open by pointing at their given path.
Why Can’t I See /bin, /etc, /usr, /var, /private, and Other Unix Directory Structure Items?
OS X leans on the cautious side and hides most root directory contents from the Finder by default. If you know what you’re doing and need to reveal everything and all root subdirectories (like ls -a / would show at the command line), you will need to set hidden files to be shown by the Mac OS X Finder. The directories and files deemed hidden by way of the chflags command or those that contain a period in front of the name will appear in light grey, but are accessible and navigable by the Finder anyway:
Do note the root directory of in a unix file system structure is basically the highest level of the filesystem hierarchy, and is completely different from the root user account, the latter of which provides high-level administrative access to a Mac.