ThisCalculator

Everyday

Show Hidden Files on Mac OS X: 3 Ways

Updated · Standard formula, shown below

Show Hidden Files on Mac OS X: 3 Ways

To show hidden files on Mac OS X, press Command + Shift + Period (⌘⇧.) in any Finder window to toggle their visibility. For a more permanent solution, you can use the Terminal command defaults write com.apple.finder AppleShowAllFiles true and restart Finder. This article explains both methods, plus a third option for accessing hidden files without changing your system settings.

Why Mac Hides Files in the First Place

macOS (and OS X before it) hides certain files and folders to prevent accidental modification or deletion. These include system configuration files like .bash_profile, application support files, and the Library folder in your home directory. The dot (.) prefix is the Unix convention for hidden files, and Apple follows it to keep the user interface clean. Hidden files are not encrypted or deleted—they simply don’t appear in Finder by default.

You might need to see them to edit a configuration file, troubleshoot an app, or free up disk space by deleting cache files. Whatever the reason, Apple provides several ways to reveal them, each with its own trade-offs.

Method 1: Keyboard Shortcut (Quickest)

The fastest way to toggle hidden files on and off is the keyboard shortcut Command + Shift + Period. This works in any Finder window and also in the Open/Save dialog boxes of most apps. Press it once to show hidden files; press it again to hide them. The change is immediate and does not require restarting Finder.

This shortcut was introduced in macOS High Sierra (10.13) and is still present in current versions. It is the recommended method for one-off tasks because it leaves no lasting change to your system settings.

Method 2: Terminal Command (Permanent Toggle)

If you want hidden files to remain visible until you decide otherwise, use Terminal. Open Terminal (from Applications/Utilities) and enter:

  1. defaults write com.apple.finder AppleShowAllFiles true – to show hidden files.
  2. killall Finder – to restart Finder and apply the change.

To revert, replace true with false and run killall Finder again. This method persists across reboots until you change it back. Note that killall Finder briefly quits and relaunches the Finder, which may close any open Finder windows—save your work first.

Method 3: Go to Folder (No Changes Needed)

If you only need to access a specific hidden file or folder, you don’t need to reveal everything. In Finder, press Command + Shift + G and type the full path, including the dot prefix. For example, to open your home Library folder, type ~/Library and press Enter. This works for any hidden path you know, such as /etc/hosts or ~/.ssh. It does not change any settings and is the safest option for occasional access.

Common Problems and Fixes

Users often encounter a few issues when trying to show hidden files:

  • Shortcut not working: The keyboard shortcut only works in Finder, not in every app. If you are in a different app, switch to Finder first. Also, check if you are using the correct key—the period key is the one with the dot, usually next to the comma on a US keyboard.
  • Terminal command not taking effect: If killall Finder does not work, try logging out and back in, or restarting your Mac. Some macOS versions cache the setting.
  • Files still hidden after toggling: Some system files are protected by SIP (System Integrity Protection) and cannot be made visible even with the shortcut. This is normal—SIP prevents you from seeing or modifying critical system files for security.
  • Hidden files reappear after restart: If you used the keyboard shortcut, it is a temporary toggle and resets on reboot. Use the Terminal method if you want a persistent change.

Safety and Precautions

Hidden files are hidden for a reason. Deleting or modifying them can break applications or even the operating system. Before you edit any hidden file, make a backup (Time Machine is ideal). Be especially careful with files in /System, /Library, and /etc—these are critical. If you are unsure what a file does, leave it alone. The keyboard shortcut is safe because it only changes visibility, not the files themselves.

Alternatives and Related Tools

Besides the built-in methods, some users prefer third-party file managers like ForkLift or Path Finder, which offer a dedicated “Show Hidden Files” button. However, these are paid apps and not necessary for most tasks. Another option is the ls -a command in Terminal, which lists all files (including hidden ones) in the current directory. This is useful for command-line users who want to see hidden files without affecting Finder at all.

For developers, the find command with -name '.*' can locate hidden files across directories. But for everyday use, the keyboard shortcut or Go to Folder is sufficient.

Frequently Asked Questions

Does the keyboard shortcut work on all Macs?

Yes, Command + Shift + Period works on all Macs running macOS High Sierra (10.13) or later. On older OS X versions, you must use the Terminal command.

Will showing hidden files slow down my Mac?

No. Showing hidden files only changes what Finder displays; it does not affect performance. However, having them visible may clutter your view, so it’s best to hide them again after you’re done.

Can I hide a file myself by adding a dot to its name?

Yes, in Terminal you can rename a file to start with a dot (e.g., mv report.txt .report.txt) and it will become hidden in Finder. This is a common trick for personal files, but be careful—some apps may not see hidden files.

Why can’t I see hidden files in the Open dialog of some apps?

The keyboard shortcut works in most Open/Save dialogs, but not all. If it doesn’t, use Command + Shift + G in the dialog and type the full path to the file.

Is there a way to show hidden files only in a specific folder?

No, the built-in methods are global. If you want to limit visibility, use the Go to Folder method to open a specific hidden folder without revealing all others.

What is the difference between hidden files and invisible files?

They are the same thing. macOS uses the Unix convention where files starting with a dot are hidden by default. There is no separate “invisible” attribute in the Finder.

Related

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