How to Show Hidden Files on Mac (3 ways)
macOS hides system and dot-files (like .gitignore or .env) so you don't accidentally break things. When you actually need to see them, here are three ways — from fastest to most permanent.
1. The keyboard shortcut (fastest)
In any Finder window, press:
⌘ Command + ⇧ Shift + . (period)
Hidden files appear, slightly dimmed. Press the same shortcut again to hide them. This is per-session and the quickest option when you just need a peek.
2. The Terminal command (permanent)
To always show hidden files, open Terminal (in Applications → Utilities) and run:
# show hidden files everywhere
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder
To hide them again, set it back to false:
defaults write com.apple.finder AppleShowAllFiles -bool false
killall Finder
This sticks across restarts — but you'll need to remember the command (and the right value) to reverse it.
Mainspring turns this exact setting — and 90+ others macOS buries in Terminal — into a single labelled toggle. Flip Show hidden files on, and flip it back just as fast. No commands to memorize, nothing permanent.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once
3. Show the hidden ~/Library folder too
Your user ~/Library folder is hidden separately. To reveal it, open Finder, press ⌘⇧G, type ~/Library, and press Return — or in your Home folder, press ⌘J and tick "Show Library Folder."
Why are files hidden in the first place?
Files beginning with a dot (.) and system folders are hidden to keep everyday users from deleting something important. Developers and power users need them constantly — which is exactly why a one-click toggle beats memorizing Terminal commands.