Quick answer

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:

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:

/Users/alex/Documents/report.pdf
~/Documents/report.pdf

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:

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:

/Users/alex/projects/website/index.html

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:

index.html

Or if you're in /Users/alex/projects/, the relative path is:

website/index.html

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:

# Your home folder
/Users/yourname

# Your Desktop
/Users/yourname/Desktop

# Your Documents
/Users/yourname/Documents

# Applications folder
/Applications

# A file downloaded from the internet
/Users/yourname/Downloads/invoice-2026.pdf

# macOS system folder (don't touch)
/System/Library

# Homebrew-installed programs
/opt/homebrew/bin/git

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:

/Users/alex/.ssh/id_ed25519
/Users/alex/.zshrc

How to Find a File's Path on Mac

There are several ways to get the path of any file on your Mac:

1

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.

2

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.

3

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.

4

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.

Power user tip

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:

# This FAILS — Terminal reads it as two separate arguments
cd /Users/alex/My Documents

# This works — quotes wrap the whole path
cd "/Users/alex/My Documents"

# This also works — backslash escapes each space
cd /Users/alex/My\ Documents

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.