This page contains promotions.

How to Show Hidden Files on Mac | Finder Shortcut and Terminal Commands

MacBook Proのキーボード

Mac hides certain files and folders by default. That keeps normal Finder views clean, but it can be confusing when you need to edit files such as .zshrc, .gitignore, or .htaccess, or when you need to open the user Library folder. This guide explains how to show hidden files temporarily in Finder, how to make them visible with Terminal, and how to access specific hidden folders safely.

Table of Contents

  1. What Are Hidden Files on Mac?
    1. Common Types of Hidden Files
    2. Be Careful Before Editing Them
  2. Show Hidden Files in Finder with a Shortcut
    1. Use Command + Shift + Period
    2. What to Check If It Does Not Work
  3. Show Hidden Files Permanently with Terminal
    1. Use the defaults Command
    2. Hide Them Again
  4. Open Specific Hidden Folders
    1. Open the Library Folder with Option
    2. Use Go to Folder
  5. FAQ
  6. Summary

What Are Hidden Files on Mac?

Hidden files are files and folders that macOS does not show in Finder by default. Some are hidden because they belong to the system. Others are hidden because their names begin with a dot, which is a common Unix convention.

You do not need hidden files for everyday tasks, but they matter for development, troubleshooting, app settings, caches, and server configuration files.

Common Types of Hidden Files

Common examples include:

  • Dotfiles such as .zshrc, .gitignore, .ssh, and .htaccess.
  • System folders such as /usr, /bin, and /var.
  • The user Library folder at ~/Library.
  • App support, cache, and preference files.

The user Library folder is especially common when you are troubleshooting an app, removing old preferences, or checking browser and developer tool files.

Be Careful Before Editing Them

Hidden files are hidden for a reason. Showing them is safe, but deleting or renaming the wrong file can break an app, reset settings, or affect macOS behavior.

Before editing or deleting a hidden file, make sure you know what it is for. If you are following a troubleshooting guide, back up the file first when possible.

Show Hidden Files in Finder with a Shortcut

The easiest method is a keyboard shortcut. It is temporary, quick, and does not require Terminal.

Use Command + Shift + Period

  1. Open a Finder window.
  2. Go to the folder where you want to view hidden files.
  3. Press Command + Shift + . (period).
  4. Hidden files should appear in a lighter, semi-transparent style.
  5. Press the same shortcut again to hide them.

This shortcut works on modern macOS versions and is the best option when you only need to check a hidden file briefly.

What to Check If It Does Not Work

If the shortcut does not work, check the following:

  • Make sure Finder is the active app.
  • Click inside the Finder window before pressing the shortcut.
  • Use the period key, not a Japanese full stop or another punctuation key.
  • Try a different folder, because some folders may not contain hidden files.
  • If you are on a very old macOS version, use the Terminal method instead.

Show Hidden Files Permanently with Terminal

If you work with hidden files often, you can change Finder's default behavior from Terminal.

Use the defaults Command

Open Terminal and run:

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

Finder will restart, and hidden files should become visible across Finder windows.

Hide Them Again

To return to the normal Finder behavior, run:

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

For most people, the keyboard shortcut is safer and more convenient. The permanent setting is best for developers or advanced troubleshooting.

Open Specific Hidden Folders

Sometimes you do not need to show every hidden file. You only need one folder, such as the Library folder.

Open the Library Folder with Option

  1. Open Finder.
  2. Click Go in the menu bar.
  3. Hold the Option key.
  4. Click Library when it appears in the menu.

This opens ~/Library without changing the global hidden-file setting.

Use Go to Folder

You can also open a hidden path directly:

  1. Open Finder.
  2. Press Command + Shift + G.
  3. Enter a path such as ~/Library, ~/.ssh, or /usr/local.
  4. Press Return.

This is useful when you already know the exact folder path.

FAQ

Are hidden files dangerous?

Not by themselves. Viewing them is safe. The risk comes from editing, moving, or deleting files without understanding what they do.

Why are dotfiles hidden?

macOS is built on Unix foundations. In Unix-like systems, files beginning with a dot are treated as hidden by convention.

Can I show hidden files only in one folder?

The Finder shortcut affects Finder display while active, but you can open a specific hidden folder directly with Go to Folder without browsing all hidden files.

Does showing hidden files slow down my Mac?

No. It only changes Finder visibility. It does not make macOS do extra background work in a meaningful way.

For a related maintenance topic, see how to clear cache on Mac.

Summary

To show hidden files on Mac, open Finder and press Command + Shift + .. Use the same shortcut to hide them again. If you need hidden files visible all the time, use the Terminal defaults command and restart Finder. For targeted access, open ~/Library with the Option key in Finder's Go menu or use Command + Shift + G to enter a specific path.