How to show hidden files on a Mac

Updated · by , maker of Gander

macOS hides thousands of files it would rather you left alone. When you need to see them, one keyboard shortcut does it.

The shortcut

In any Finder window, press ⇧⌘. (Shift, Command and the full stop key).

Hidden files and folders appear, drawn slightly faded. Press the same keys again to hide them. The shortcut also works in the Open and Save windows of other apps.

Open the Library folder

Your personal Library holds app settings and data, and it is hidden.

  1. In Finder, open the Go menu.
  2. Hold ⌥. Library appears in the menu.
  3. Click it.

To keep it visible, open your home folder, choose View, then Show View Options, and tick Show Library Folder.

In Terminal

List everything in the current folder, hidden files included:

ls -a

To make Finder show hidden files permanently:

defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder

Change true to false to reverse it.

What makes a file hidden

Hide a file of your own

chflags hidden ~/Documents/private-notes.txt

Use nohidden in place of hidden to bring it back. This only keeps the file out of casual view. Anyone who presses the shortcut above will see it, so it is not a way to protect anything sensitive.

Take care

Hidden files are hidden because deleting or changing them can break apps or macOS itself. Look, by all means. Before deleting anything, be sure what it belongs to.

.DS_Store files are safe to ignore. Finder creates one in each folder to remember how you like that folder displayed.

What Gander shows

Gander leaves hidden files out on purpose. It shows the files you made, downloaded or saved, in your Desktop, Documents, Downloads, Pictures, Movies and Music folders, and skips the plumbing. If you are hunting for a configuration file, Finder with the shortcut above is the right tool.

FAQ

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

Shift-Command-Period, pressed in a Finder window.

Why can't I see the Library folder?

It is hidden by default. Hold Option while the Go menu is open in Finder, or use the shortcut to show hidden files.

Is it safe to delete .DS_Store files?

Yes. Finder recreates them. You lose only that folder's saved view settings.

Share this guide: X · LinkedIn · Reddit · Hacker News · Email

Keep reading