macOS · How-To

How to Show Hidden Files on a Mac

By , Editor · · Updated for macOS 2026
The fast answer

In Finder, press Command + Shift + . to toggle hidden files on and off. Nothing to install, nothing permanent — it is the method to reach for first.

The quickest way to show hidden files on a Mac is to open a Finder window and press Command + Shift + . (the period key). Every hidden file and folder in that location appears at once, shown as dimmed, semi-transparent icons. Press the same three keys again to hide them. That single shortcut covers most needs — but macOS also hides your personal ~/Library folder separately, and there is a Terminal command that makes hidden files stay visible everywhere until you turn it back off. This guide covers all three, plus when it is safe to touch what you find.

If you are coming from Windows, think of this as the Mac equivalent of the "Hidden items" checkbox in File Explorer's View ribbon. macOS hides two kinds of things: files and folders whose names start with a dot (.), such as .DS_Store or .zshrc, and a handful of folders Apple flags as hidden, such as your Library. The methods below reveal both.

This is the method almost everyone should use. It is instant, needs no Terminal, and toggles cleanly.

  1. Click the desktop or the Finder icon in the Dock so Finder is the active app.
  2. Open the folder you want to inspect — for example your Home folder or a project folder. You can open a new Finder window with Command + N.
  3. Press Command + Shift + . (period).
  4. Hidden items appear immediately, dimmed so you can tell them apart from normal files.
  5. Press Command + Shift + . again to hide them when you are done.

The same shortcut also works inside the Open and Save dialog boxes of most apps, which is handy when you need to reach a hidden file while attaching or importing something.

Tip — it is only a view toggle

Showing hidden files does not change, move, or unhide anything permanently. It simply tells Finder to draw items it normally skips. Toggle it as often as you like with no side effects.

Method 2 — Show the hidden ~/Library folder

Your personal Library folder, at ~/Library, is where apps keep preferences, caches, containers, and support files. Apple hides it on its own — the Command + Shift + . toggle reveals it too, but if the Library is all you need there are two tidier ways to reach it without exposing every dot-file on the disk.

Option A — the Go menu

  1. Switch to Finder.
  2. Open the Go menu in the menu bar at the top of the screen.
  3. Hold down the Option (⌥) key. A Library entry appears in the menu while the key is held.
  4. With Option still down, click Library to open ~/Library.

This is Apple's own documented route: its Go directly to a specific folder on Mac page says to "press and hold the Option key, then choose Library", and covers the Go → Go to Folder pathname method used below.

Option B — make Library permanently visible in your Home folder

  1. In Finder, open your Home folder (press Command + Shift + H).
  2. Open ViewShow View Options, or press Command + J — the same menu item and shortcut Apple documents in Change how folders are displayed in the Finder on Mac.
  3. At the bottom of the panel, tick Show Library Folder.

The Library folder now stays visible in your Home folder until you untick that box. If you just want to jump in once, you can also use Go → Go to Folder (Command + Shift + G) and type the path:

~/Library

Press Return and Finder opens it directly.

Method 3 — Toggle hidden files in Terminal

If you want hidden files to stay visible across the whole system — for example while you are doing development work — you can flip Finder's AppleShowAllFiles setting with the built-in defaults command. This is the persistent equivalent of the keyboard shortcut: it stays on through restarts until you turn it off.

  1. Open Terminal — find it in Applications → Utilities, the location given in Apple's Open or quit Terminal on Mac guide, or press Command + Space for Spotlight, type Terminal, and press Return.
  2. Type the following command exactly, then press Return:
    defaults write com.apple.finder AppleShowAllFiles -bool true
  3. Relaunch Finder so the change takes effect:
    killall Finder

Finder restarts and hidden files are now shown everywhere. To hide them again, run the same command with false and relaunch Finder:

defaults write com.apple.finder AppleShowAllFiles -bool false
killall Finder
Caution — leave system and app data alone

Once hidden files are visible, treat them as read-only unless you know exactly what a file does. Items such as .DS_Store, the property lists in ~/Library/Preferences, and the folders under ~/Library/Containers are used by macOS and your apps. Deleting, renaming, or editing them can reset settings, break an app, or lose data. Never drag hidden system items to the Trash "to free up space", and back up with Time Machine before changing anything.

Which method should I use?

For a quick look, use the keyboard shortcut — it is reversible and leaves no lasting change. If your only goal is app preferences or caches, reveal just the Library folder and leave everything else hidden. Reach for the Terminal command only when you genuinely need hidden files visible all the time, and remember to switch it back off afterwards to keep Finder tidy.

Whichever route you take, the golden rule is the same: showing a hidden file is harmless, but changing one rarely is. Look first, and only touch what you understand.

Frequently asked

What is the keyboard shortcut to show hidden files on a Mac?

In any Finder window, press Command-Shift-. (the period key). Hidden files and folders appear immediately as dimmed, semi-transparent icons. Press the same shortcut again to hide them. This works throughout Finder and in the Open and Save dialogs of most apps.

Why is the ~/Library folder hidden on macOS?

Apple hides your personal Library folder (~/Library) by default because it holds app support files, caches, preferences and containers that most people never need to touch. Hiding it reduces the chance of deleting or changing something an app depends on. You can reveal it without exposing every other hidden file by opening your Home folder, pressing Command-J for View Options, and ticking Show Library Folder.

Is it safe to delete hidden files on a Mac?

Usually not. Many hidden files are system or application data — files such as .DS_Store, preference property lists, and the contents of ~/Library/Containers are used by macOS and your apps. Deleting them can reset settings, break apps, or cause data loss. Only remove a hidden file when you are certain what it does, and back up first with Time Machine.

How do I hide the files again after showing them?

If you used the Command-Shift-. shortcut, just press it again to toggle hidden files back off. If you used the Terminal method, run the same defaults command with a value of false — defaults write com.apple.finder AppleShowAllFiles -bool false — then killall Finder to relaunch Finder.

More macOS guides

This is part of our growing macOS section. Browse all macOS guides, or head back to the Windows Now home for Windows, macOS and Linux how-tos.