How to Open Hidden Files on Mac: What You Need to Know
Hidden files on a Mac aren't gone — they're just out of sight. macOS deliberately conceals certain files and folders to protect system integrity and reduce clutter. But there are plenty of legitimate reasons you might need to access them: troubleshooting software, editing configuration files, recovering data, or digging into app support folders. Here's how it works.
Why macOS Hides Files in the First Place
Apple hides certain files by default for good reason. System files, library folders, cache directories, and configuration files can cause serious problems if accidentally modified or deleted. Files and folders prefixed with a dot (like .bash_profile or .DS_Store) are Unix-style hidden items — a convention inherited from the underlying BSD architecture macOS is built on.
Other folders, like the Library folder inside your user directory (~/Library), are hidden through a macOS attribute rather than a dot prefix. Both types behave differently and sometimes require different methods to reveal them.
The Fastest Method: Keyboard Shortcut in Finder 🔍
The quickest way to show hidden files in any Finder window is with a keyboard shortcut:
Command (⌘) + Shift + Period (.)
Press this while a Finder window is open, and hidden files and folders will immediately appear, shown in a slightly faded/grey appearance to distinguish them from normal files. Press the same combination again to hide them.
This works across most macOS versions from Sierra (10.12) onward. It's the go-to method for most users because it requires no terminal knowledge and is instantly reversible.
Using Terminal for More Control
For users comfortable with the command line, Terminal gives you persistent control over hidden file visibility. Open Terminal (found in Applications → Utilities) and enter:
defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder This forces Finder to restart with all hidden files visible system-wide. To reverse it:
defaults write com.apple.finder AppleShowAllFiles FALSE killall Finder The difference between this method and the keyboard shortcut is persistence — the Terminal command keeps hidden files visible across all Finder windows until you reverse it. The shortcut only applies to the current Finder session and resets more easily.
Accessing the Hidden Library Folder Specifically
The ~/Library folder deserves its own mention because it's one of the most frequently needed hidden locations. It stores app preferences, support files, caches, and saved states. There are a few targeted ways to reach it:
Method 1 — Go menu: In Finder, click Go in the menu bar, then hold down the Option (⌥) key. The Library folder will appear in the dropdown. Click it to open directly.
Method 2 — Go to Folder: Press Command + Shift + G in Finder, then type ~/Library and press Enter.
Method 3 — Terminal: Type open ~/Library in Terminal and press Enter.
These methods surface the Library folder without making all hidden files visible globally — useful when you only need that one location.
Viewing Hidden Files in macOS Ventura, Sonoma, and Later Versions
The keyboard shortcut and Terminal methods described above work consistently across recent macOS versions. Apple hasn't introduced a dedicated toggle in System Settings for hidden files, so these remain the standard approaches.
One thing to be aware of: macOS updates occasionally reset Terminal-applied preferences. If you've used the Terminal command and upgraded your OS, it's worth checking whether the setting persisted.
Key Variables That Affect Your Approach
| Factor | What It Changes |
|---|---|
| macOS version | Keyboard shortcut availability varies; older systems may need Terminal |
| Technical comfort level | Terminal methods offer more control but carry higher risk if misused |
| Why you need the files | A one-time peek vs. regular access suggests different methods |
| Which files you need | Library folder vs. dot files vs. system files may require different steps |
| File manager app | Third-party apps like Path Finder have their own hidden file settings |
A Word on Editing Hidden Files ⚠️
Revealing hidden files is one thing — editing them is another. Many hidden files are configuration or system files that macOS and installed applications depend on. Accidentally modifying or deleting the wrong file can cause app instability or system errors.
If you're accessing hidden files for a specific task — like editing a .zshrc profile, clearing an app's cache, or recovering a file — it helps to know exactly which file you need before you start browsing. Enabling hidden file visibility and then exploring freely can lead to unintended changes.
Different Users, Different Needs
A developer who regularly edits dotfiles and shell configuration scripts will likely want a reliable Terminal workflow and may even use a text editor that handles hidden files natively. A general user who needs to clear a stubborn app's cache once will find the keyboard shortcut more than sufficient. Someone using a third-party Finder replacement may not need either method at all.
The right approach depends heavily on how often you need access, how comfortable you are with Terminal commands, and what you're actually trying to do once those files are visible. Knowing the methods is the easy part — knowing which one fits your workflow is where your own setup becomes the deciding factor.