How to Show Hidden Files on a Mac: Keyboard Shortcut, Library Folder, and Terminal

You do not need any extra software to see hidden files on a Mac. Since macOS Sierra, Finder has a built-in keyboard shortcut that toggles every hidden file and folder on or off in about a second. This guide covers the shortcut, the hidden Library folder (the one people are usually actually looking for), the Terminal method for older Macs, and how to tuck everything back out of sight when you are done.

The 3-second answer: press Cmd + Shift + Period

Open a Finder window, then press Cmd + Shift + Period (the keys ⌘ ⇧ .). Every hidden file and folder appears instantly, shown as greyed-out, semi-transparent icons so you can tell them apart from normal files. Press the same combination again to hide them.

Two things most guides skip:

  • It works inside Open and Save dialogs too. If an app's Open window will not show a hidden folder you need, press Cmd + Shift + Period right there in the dialog.
  • It is per-Mac, not per-window. Toggling it on shows hidden files in every Finder window until you toggle it off again.

What those greyed-out files actually are

macOS hides files for a reason: almost all of them are settings and support files that apps and the system manage on their own.

  • Dotfiles — anything whose name starts with a period, like .zshrc or .gitconfig. This is a Unix convention macOS inherited; the leading dot itself is what marks the file as hidden.
  • .DS_Store files — tiny files Finder drops in every folder you open to remember view settings (icon positions, sort order). Harmless, and they come back if you delete them.
  • The Library folders — app preferences, caches, and saved data. There are actually two: a system-wide /Library and a personal one at ~/Library inside your user folder. The personal one is hidden by default.
  • System folders — Unix directories like /usr, /bin, and /private that macOS itself runs on.

Just need the Library folder? Use the Go menu

Nine times out of ten, someone showing hidden files is really trying to reach ~/Library — to clear an app's cache, find a saved-game folder, or delete a stubborn preference file. You can get there without revealing every hidden file on the Mac:

  1. Click the Go menu in Finder's menu bar.
  2. Hold down the Option key. A Library entry appears in the menu — click it.

Or press Cmd + Shift + G (Go to Folder), type ~/Library, and hit Return.

Want it visible permanently? Open your home folder in Finder, press Cmd + J to open View Options, and tick Show Library Folder. It stays visible from then on, no shortcut needed.

The Terminal method (older Macs and permanent changes)

On a Mac running something older than macOS Sierra (2016), the keyboard shortcut does not exist. Terminal works on everything:

defaults write com.apple.finder AppleShowAllFiles -bool true

then restart Finder so the change takes effect:

killall Finder

To hide them again, run the same command with false instead of true, followed by killall Finder. On any modern Mac, skip this entirely — the shortcut does the same thing without touching Terminal.

How to hide a file yourself

Flip it the other way and you can make your own file or folder invisible in Finder:

  • Terminal: chflags hidden followed by a space, then drag the file into the Terminal window to fill in its path, and press Return. Use chflags nohidden to reverse it.
  • Rename with a leading dot: Finder will warn you the file will be hidden — that warning is the feature.

Remember anyone can reveal it with Cmd + Shift + Period, so this is tidiness, not security. For anything genuinely private, use an encrypted disk image or FileVault instead.

A quick warning before you start deleting

Hidden files look like clutter, but deleting them rarely frees meaningful space and can break app settings or sign you out of things. Do not mass-delete dotfiles or anything inside /usr or /private. If the real goal is reclaiming storage, clearing the right caches the right way is covered in our guide to fixing a full MacBook drive — it frees far more space than hunting hidden files ever will.

Related guides

All guides →

Frequently Asked Questions

Why can't I see my Library folder on my Mac?

Apple hides the personal Library folder (~/Library) by default because it holds app settings and caches that are easy to break. Hold Option while clicking Finder's Go menu and a Library entry appears, or press Cmd + Shift + G and type ~/Library.

Does Cmd + Shift + Period work in Open and Save dialogs?

Yes. The shortcut toggles hidden files inside any app's Open or Save window, not just in Finder. That is usually the fastest way to point an app at a hidden folder.

Is it safe to delete hidden files on a Mac?

Mostly no. Dotfiles and Library contents are settings that apps expect to find; deleting them can reset apps or break logins, and .DS_Store files just regenerate. Delete a specific file only when a guide for that specific app tells you to.

How do I hide files again after showing them?

Press Cmd + Shift + Period a second time. If you used the Terminal method, run the same defaults write command with false and then killall Finder.

Need help with a computer problem?

LC provides computer repair and practical IT support in Marion, Ohio. Tell us what is interrupting your work and ask about the service scope and availability.