Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Show Hidden Files on Mac: The Easy Way

· 5 min read · Home Tech

In this article
  1. Why Macs Hide Files in the First Place
  2. The Quickest Method: Keyboard Shortcut
  3. Using Terminal to Show Hidden Files Permanently
  4. How to Show Hidden Files in Open/Save Dialogs
  5. Accessing the User Library Folder
  6. Common Problems and Troubleshooting
  7. Frequently Asked Questions

To show hidden files on a Mac, press Command + Shift + Period (.) in any Finder window or on the desktop. This keyboard shortcut instantly toggles the visibility of all hidden files and folders, and pressing it again hides them. For a more permanent solution, you can use the Terminal command defaults write com.apple.finder AppleShowAllFiles true followed by killall Finder.

Why Macs Hide Files in the First Place

macOS hides certain files and folders to protect them from accidental modification or deletion. These are typically system-level files, configuration files (like .bash_profile or .zshrc), and application support files that, if changed or removed, could break software or the operating system itself. The convention is to precede a file or folder name with a dot (e.g., .hiddenfile), which is why they're often called "dotfiles." This is a Unix/Linux tradition that macOS inherited from its BSD roots. Even though they're hidden, they are still fully functional and occupy space on your drive.

The Quickest Method: Keyboard Shortcut

The Command + Shift + Period shortcut works in the Finder and on the desktop. It's a toggle, so it's perfect for a quick peek. Here's how to use it:

  • Open a Finder window and navigate to the folder you want to inspect.
  • Press Command + Shift + Period.
  • Hidden files and folders will appear with a slightly translucent appearance (about 50% opacity).
  • Press the same keys again to hide them.

This method is temporary—it only affects the current Finder session and doesn't change any system settings. It's the safest way to view hidden files without risking any system instability.

Using Terminal to Show Hidden Files Permanently

If you find yourself needing to see hidden files often, you can change the default setting in macOS. This is done via Terminal, the command-line interface. The command writes a preference to the Finder's configuration file:

  1. Open Terminal (found in Applications > Utilities).
  2. Type the following command and press Return:
    defaults write com.apple.finder AppleShowAllFiles true
  3. Then type killall Finder and press Return. This restarts the Finder, and the change takes effect.

To revert to the default hidden state, replace true with false in the first command, and run killall Finder again. This method is system-wide and will persist until you change it back.

How to Show Hidden Files in Open/Save Dialogs

In many apps, when you use the Open or Save dialog (the window that appears when you press Command+O or Command+S), you can also press Command + Shift + Period to toggle hidden files. This is handy when you need to navigate to a hidden folder like ~/Library to save a file or open a template. The shortcut works in the standard file picker in most macOS apps.

Accessing the User Library Folder

One of the most common reasons people want to show hidden files is to access the ~/Library folder, which contains app preferences, caches, and support files. Since macOS Lion (10.7), this folder is hidden by default. You can reveal it with the shortcut or by using the Terminal command. Alternatively, you can hold down the Option key while clicking the Go menu in Finder—the Library option will appear. This is a quick, one-off way to access it without changing any settings.

Common Problems and Troubleshooting

If the keyboard shortcut doesn't work, it's usually because you're not in a Finder window or the desktop. The shortcut works in Finder windows, on the desktop, and in Open/Save dialogs, but not in other apps. If you're using Terminal and the killall Finder command doesn't seem to work, check that you typed the commands exactly, including spaces. Another issue: some third-party apps might override the shortcut. In that case, try the Terminal method. Also, remember that hidden files are hidden for a reason—if you delete or move them, you could break applications or your system. Always be cautious when working with hidden files.

Frequently Asked Questions

Will showing hidden files slow down my Mac?

No, simply toggling the visibility of hidden files does not affect performance. The files are always there; you're just changing whether the Finder displays them. However, if you leave them visible, you might accidentally modify or delete a critical file, which could cause problems.

How do I hide a file or folder of my own?

You can hide any file or folder by putting a period at the beginning of its name. For example, rename MyNotes.txt to .MyNotes.txt. The Finder will then hide it. You can do this in Terminal using the mv command: mv MyNotes.txt .MyNotes.txt. To unhide, just remove the period.

Is it safe to delete hidden files?

Generally, no. Hidden files are usually system or application files that are required for proper operation. Deleting them can cause apps to crash, lose settings, or even make your Mac unbootable. Only delete hidden files if you are absolutely sure what they are and why you're deleting them.

Why can't I see hidden files on an external drive?

The same keyboard shortcut works on external drives connected to your Mac. If it doesn't, the drive might be formatted with a filesystem that macOS handles differently, like NTFS (Windows). In that case, the hidden attribute is set by the other system, and macOS may not display it. You can try using Terminal to check, but the shortcut should work in most cases.

Does the Terminal command work on all versions of macOS?

Yes, the defaults write command has been consistent across modern macOS versions, including macOS Sonoma, Ventura, Monterey, and earlier. The keyboard shortcut also works on all recent versions. If you're on an older version like macOS Mojave or Catalina, it still works the same way.