keepcalculator

06 Numbers and Powers

Show Hidden Files Folders Mac: 3 Easy Ways

Card No. 06·27140 · Updated · Standard formula, shown below

To show hidden files and folders on a Mac, open Finder and press Command + Shift + Period (.) — this toggles hidden items on and off. Alternatively, you can use Terminal with the command defaults write com.apple.finder AppleShowAllFiles true and then restart Finder. This article explains these methods in detail, why files are hidden, and how to manage them safely.

Why Mac Hides Files and Folders

macOS hides certain files and folders to protect them from accidental modification or deletion. These include system files, configuration files (like .bash_profile), and user library files (like ~/Library). The hidden status is determined by a file name that starts with a dot (e.g., .gitignore) or by a special file flag (the “hidden” flag). Hiding them keeps the system stable and reduces clutter, but sometimes you need to see them to troubleshoot, edit a config, or access backups.

Method 1: Keyboard Shortcut in Finder (Fastest)

  1. Open a Finder window (click the Finder icon in the Dock).
  2. Press Command + Shift + Period (.).
  3. Hidden files and folders will appear grayed out (semi-transparent) in the current folder and all folders you navigate to.
  4. Press the same keys again to hide them.

This shortcut works in macOS Sierra (10.12) and later, including macOS Ventura and Sonoma. It does not require restarting Finder and is the quickest way to toggle visibility on the fly.

Method 2: Terminal Command (Persistent Toggle)

If you want to change the default behavior so that hidden files are always shown (or always hidden), use Terminal:

  1. Open Terminal (in /Applications/Utilities/ or via Spotlight).
  2. Type the following command and press Enter:
    defaults write com.apple.finder AppleShowAllFiles true
  3. Restart Finder by typing: killall Finder and pressing Enter.
  4. To revert, change true to false in the same command.

This method is useful if you need hidden files visible across all Finder windows, including after reboots. The setting is stored in the Finder preferences file.

Method 3: Reveal a Single Hidden File or Folder

If you only need to access one hidden item (like ~/Library) without showing everything, you can use Finder’s “Go to Folder” feature:

  1. In Finder, press Command + Shift + G.
  2. Type the full path, e.g., ~/Library or /private/etc.
  3. Press Enter. The folder opens even if it is hidden.

This is a safe way to access a specific hidden folder without changing global settings.

How to Hide Files and Folders Again

To re-hide files after using the shortcut, press Command + Shift + Period again. If you used the Terminal method, set AppleShowAllFiles to false and run killall Finder. You can also hide a specific file or folder by renaming it with a dot at the beginning (for example, notes.txt becomes .notes.txt) or by using the Terminal command chflags hidden /path/to/file.

Common Problems and Fixes

  • Shortcut doesn’t work: Make sure you’re in Finder, not another app. The shortcut works only in Finder windows.
  • Files still not showing after Terminal command: Restart Finder with killall Finder. If that doesn’t work, log out and back in.
  • Hidden files appear but are grayed out: That’s normal; they are still accessible. You can open them normally.
  • Can’t see hidden files in Open/Save dialogs: The keyboard shortcut also works in most Open/Save dialogs, but not all apps. Use the Terminal method for a global change.
  • Accidentally deleted a hidden file: If you delete something important, restore it from Time Machine or a backup. Be careful when deleting hidden files.

Safety and Best Practices

Hidden files are often critical system files. Do not modify or delete them unless you know exactly what they do. For example, the ~/Library folder contains app preferences and caches; deleting the wrong file can corrupt apps. Always back up before making changes. If you’re troubleshooting, search for the specific file name online to confirm what it is. Never follow advice that tells you to delete random hidden files to “speed up” your Mac — that can cause more harm than good.

Alternatives to Showing Hidden Files

If you need to edit a hidden file, you can use a code editor like TextEdit (in plain text mode) or a dedicated app like Sublime Text. For browsing hidden folders, you can also use the ls -a command in Terminal to list all files (including hidden ones) in the current directory. For a more visual approach, third-party file managers like ForkLift show hidden files with a toggle, but the built-in methods are usually sufficient.

Frequently Asked Questions

How do I show hidden files on Mac permanently?

Use the Terminal command defaults write com.apple.finder AppleShowAllFiles true and then killall Finder. This sets the preference permanently until you change it back.

Why can’t I see hidden files even after pressing Command+Shift+Period?

Make sure you are in a Finder window, not on the desktop or in another app. If it still doesn’t work, restart Finder (from Terminal: killall Finder) or try the Terminal method.

What is the shortcut to show hidden files on Mac?

The shortcut is Command + Shift + Period (.). It toggles hidden files on and off in Finder.

How do I hide files on Mac again?

Press Command + Shift + Period again to toggle off, or change the Terminal setting to false and restart Finder.

Can I show hidden files on an external drive?

Yes, the same methods work for external drives connected to your Mac. The Finder shortcut and Terminal command apply to all mounted volumes.

Is it safe to delete hidden files?

Generally no. Hidden files are often system or configuration files. Only delete them if you are certain they are not needed, and always have a backup.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →