How to Show Hidden Files on Mac in Finder and Terminal

The Quick Answer

Open Finder, then press Command + Shift + Period (⌘ + ⇧ + .). Hidden files and folders should appear slightly faded. Press the same shortcut again to hide them.

Looking for the hidden Library folder? In Finder, click Go in the menu bar, hold down Option, then select Library. That opens ~/Library without revealing every hidden file on your Mac.

If you’d rather have Finder keep hidden items visible after it restarts, use the Terminal command below. A little caution here: moving or deleting the wrong hidden system file can affect an application, your user account, or macOS itself.

Three Ways to Show Hidden Files

MethodBest forPersistent?
Finder shortcutQuickly revealing hidden itemsNo
Go to FolderOpening a known hidden pathNot applicable
TerminalKeeping hidden files visible in FinderYes, until reversed

Use the Finder Keyboard Shortcut

  1. Open Finder.
  2. Go to the folder you want to inspect.
  3. Press Command + Shift + Period (⌘ + ⇧ + .).
  4. Look for faded files and folders. That faded appearance means the item is normally hidden.
  5. Press the shortcut once more when you’re done.

The shortcut works in many macOS Open and Save dialog boxes as well. Handy if an application needs a file tucked inside a hidden configuration folder.

Open a Hidden Folder Directly

Already know the folder path? Then there’s no need to expose everything. Finder can open that hidden location directly.

  1. Open Finder.
  2. Choose Go > Go to Folder from the menu bar, or press Command + Shift + G.
  3. Type the path. For the current account’s Library folder, enter:
~/Library

Choose the suggested folder or press Return. A few other useful paths are listed below.

PathLocation
~/LibraryLibrary folder for your user account
~/.sshSSH keys and configuration
~/.configConfiguration files used by some applications
/LibrarySystem-wide application support files

The tilde character (~) stands for your home folder. And watch the slash: ~/Library and /Library are two different locations.

Keep Hidden Files Visible with Terminal

Use Terminal if you want Finder to show hidden files consistently, rather than toggling them on for a quick look.

  1. Open Terminal from Applications > Utilities, or find it through Spotlight.
  2. Run these commands:
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder

The first command changes Finder’s hidden-file preference. The second restarts Finder so the setting takes effect right away. Your Finder windows may close or disappear briefly during that restart. That’s expected.

Hide the Files Again

Once you’ve finished, return Finder to its usual behavior with the following commands:

defaults write com.apple.finder AppleShowAllFiles -bool false
killall Finder

These commands don’t delete, move, or alter the hidden files. They only control whether Finder displays them.

View Hidden Files in Terminal

To list everything in the current Terminal directory, including names that begin with a period, run:

ls -la

To inspect your home folder instead, use:

ls -la ~

The -a option includes hidden entries. Meanwhile, -l shows details such as permissions, ownership, file size, and modification date.

Why macOS Hides Some Files

Most hidden files are things you probably don’t need during ordinary use: preference data, caches, command-line configuration files, and application support folders. On Unix-based systems, files beginning with a period are conventionally hidden. Examples include .zshrc and .gitconfig.

A filename doesn’t always need that leading period, though. Finder metadata or filesystem flags can hide other items too.

Mistakes to Watch For

  • Deleting a file you don’t recognize: Check what it does before changing it, and keep a backup.
  • Mixing up the Library folders: ~/Library belongs to your user account. /Library applies more broadly.
  • Using sudo when you don’t need it: Administrator privileges aren’t required just to view hidden files.
  • Leaving hidden items on display: Finder gets cluttered, and an accidental change becomes more likely.
  • Editing application data while the app is running: The application may overwrite your changes or leave its data in an inconsistent state.

Check That It Worked

Open your home folder in Finder and look for faded entries, especially names beginning with a period. The normally hidden Library folder may show up as well. If nothing changes, click inside the Finder window and press Command + Shift + Period again. Make sure you’re including the Period key.

Leave a Comment

Related Posts