A file path is the address of a file on your Mac, written as a series of folder names separated by / slashes. For example: /Users/alex/Documents/report.pdf means: start at the root of the drive, go into Users, then alex, then Documents, and find report.pdf. To find a file's path, hold Option and right-click it in Finder, then choose "Copy as Pathname".
The Address Book Analogy
Think of your Mac's storage as a city. Every file lives at a specific address. To give someone directions to a house, you'd say: country → state → city → street → house number. A file path works the same way, except instead of geographic levels, you have folders nested inside folders.
The path /Users/alex/Documents/Work/proposal.docx reads like this:
/— Start at the root (the very top of everything on your Mac, equivalent to the hard drive icon)Users— Go into the Users folderalex— Go into the folder for the user named alexDocuments— Go into the Documents folderWork— Go into the Work subfolderproposal.docx— That's the file
Each / slash is just a separator that means "and then go into". The final item without a trailing slash is usually the file itself; with a trailing slash it's understood to be a folder.
What Does / Mean at the Start of a Path?
The single forward slash at the very beginning of a path means you're starting from the root — the absolute top of macOS's file system. When you open Finder and click through folders normally, you're always navigating inside this hierarchy, even if Finder's sidebar hides some of it.
This root-relative style is called an absolute path. It's unambiguous regardless of where you're starting from. /Users/alex/Downloads/photo.jpg always points to the same file on alex's Mac.
What Does ~ Mean in a Path?
The tilde character (~) is a convenient shorthand for your home folder. On macOS, your home folder lives at /Users/yourname. So these two paths point to exactly the same location:
The tilde substitution happens automatically in Terminal and most command-line tools. You'll also see it in app settings, configuration files, and error messages. It's never the actual folder name — it's always being expanded to the real path behind the scenes.
You'll commonly see paths like:
~/Desktop— your Desktop~/Downloads— your Downloads folder~/Library— app support files and preferences (hidden in Finder by default)~/.zshrc— your shell configuration file (the dot prefix means it's hidden)
Absolute vs Relative Paths
This is where many beginners get tripped up. There are two fundamentally different ways to write a path, and they're used in different situations.
Absolute paths
An absolute path starts from the root (/) and gives the complete address, no matter where you are. It's always unambiguous:
This always refers to exactly one file. You can paste it anywhere — in Terminal, a config file, an error message — and it will always resolve to the same location.
Relative paths
A relative path describes the location relative to your current position. If you're already in the folder /Users/alex/projects/website/, then the relative path to the same file is just:
Or if you're in /Users/alex/projects/, the relative path is:
Relative paths are shorter and more portable — they're commonly used in code because they work regardless of which computer the project lives on or where you installed it. For a deeper comparison, see Absolute vs Relative Paths Explained.
Common Mac File Paths You'll Recognize
Here are some paths you'll encounter often on macOS:
What Are Hidden Files? (The Dot Prefix)
You may notice some files and folders have names starting with a dot, like .zshrc, .gitignore, or .DS_Store. These are hidden files — macOS Finder doesn't show them by default, but they still exist at their paths and can be accessed in Terminal or by pressing ⌘ + Shift + . in Finder to toggle their visibility.
The full path to a hidden file looks exactly like any other path — the dot is just part of the filename:
How to Find a File's Path on Mac
There are several ways to get the path of any file on your Mac:
Option + right-click in Finder: Hold the Option key, right-click the file, and choose "Copy [filename] as Pathname". This copies the full absolute path to your clipboard. See our complete guide for all methods.
Finder's Path Bar: In Finder, press ⌥ + ⌘ + P to show the path bar at the bottom of the window. It shows each folder in the current file's path as a series of icons you can click to navigate.
Terminal: Drag any file from Finder into a Terminal window to insert its path. Or type realpath ~/Documents/report.pdf to print the resolved absolute path.
With Pathly: Right-click any file and choose "Copy Path" (no Option key needed). Pathly also lets you copy just the filename, the parent folder, a file:// URL, or a git-relative path — all from the same menu.
If you need to share a file's location with someone — in a Slack message, a bug report, or a document — the full absolute path is usually the clearest choice. But if you're referencing a file within a project (for a developer, a ticket, or an AI tool), a relative path is shorter and less confusing. Pathly gives you both formats with two clicks.
Why Spaces in Paths Can Cause Problems
Folder and file names on Mac can contain spaces — like "My Documents" or "Project Files". In Finder this looks completely normal. But in Terminal, a space is interpreted as a separator between two separate arguments, so a path with spaces must be handled specially:
When you drag a file from Finder into Terminal, macOS automatically escapes the spaces with backslashes. When you copy a path with Option + right-click or with Pathly, you get the raw path — you'll need to wrap it in quotes before using it in Terminal if it contains spaces.
This is one reason developers often avoid spaces in project folder names, preferring hyphens or underscores: my-project instead of my project.