How to Show Hidden Files on macOS: An Easy Step-by-Step Guide

Home > HowTos > Troubleshooting Tips Updated by Robert on May 11, 2024 | Approved by Daryl Baxter

Whether you're a seasoned developer or a casual Mac user, there may come a time when you'll need to access hidden files on your macOS. These files are usually hidden for a reason - to avoid them from accidental deletion or modification, as they often contain essential data required for your applications to run correctly. However, if you know what you're doing, here's how to show hidden files on macOS.

Table of contents
Part 1. What Are Hidden Files on Mac?
Part 2. Why You Might Want to Access Hidden Files in macOS?
Part 3. Precautions to Take When Accessing Hidden Files on Mac
Part 4. How to Show Hidden Files in macOS
Part 5. FAQs

What Are Hidden Files on Mac?

macOS hidden files are typically system or program files hidden from the user by default. These files are usually important app/operating system-related files. They are hidden to prevent users from accidentally modifying or deleting them, which could cause the system and applications to become unstable or even unbootable.

These files often start with a period ('.') and include files such as:

In addition, many other hidden files, particularly in the root and user home directories, help macOS and your applications run correctly.

Why You Might Want to Access Hidden Files in macOS?

Precautions to Take When Accessing Hidden Files on Mac

Remember, it's crucial to proceed cautiously when dealing with hidden files. They're hidden for a reason, and messing with them could lead to unintended consequences.

How to Show Hidden Files in macOS

Mac is known for its sleek and intuitive design, but sometimes, you may need to access hidden files to troubleshoot an issue or make customizations. For iMac, Mac, and MacBook show hidden files may seem tricky, but it is actually quite simple. For this, you do:

Method 1: Use a Keyboard Shortcut

  1. Find Finder in your Dock and open it, usually at the bottom of your screen.
  2. Navigate to the folder where you want to view hidden files.
  3. Press the Command + Shift + . (dot) keys simultaneously.

This will show hidden files/folders on Mac. Press the key again to hide them.

Tips on what the Library Folder does and how to find it:

The Library folder on a Mac is a system folder that contains important files and data about your applications, user settings, and more. It's usually hidden by default to prevent accidental deletion or modification of these files, as that could cause problems with the functioning of your Mac, so only access them if you know what you're doing. There are several ways to find the Library folder on your Mac:

Method 2: Use the File Invisible Option

  1. Open the directory where hidden files or folders need to be displayed.
  2. Press Command + F keys simultaneously.
  3. Click the "Kind" drop-down box in the filter criteria that appear and select "Other."

  4. Check "File invisible" in the "Select a search attribute" window and click "OK."

  5. Select "Any" in the "Image" drop-down box and press "Enter."

  6. After waiting a while, all the files in this directory will be displayed. The semi-transparent files are the hidden files you are looking for.

Method 3: Use Terminal Commands

  1. Find "Terminal" in your "Applications" folder under "Utilities" and open it.
  2. In the Terminal window, type "defaults write AppleShowAllFiles true" and press "Enter."
  3. Type "killall Finder" and press "Enter."

  4. To show hidden files in macOS take effect, you'll need to restart Finder.

Tip: To hide the files again, repeat the process but replace true with false in step 2. If you want to hide specific files or folders, Here's how:

  1. Go to the directory that contains the files you want to hide. You can do this using the CD command. For example, if your photo is in the Pictures folder, you would type cd Pictures and press Enter.
  2. Rename the files to start with a period. You can do this using the mv command. For example, if your photo is named photo.jpg, you would type mv myphoto.jpg .myphoto.jpg and press Enter.

Please remember that hiding files is not a secure way to protect sensitive information. If you need to keep a file private, consider encrypting it instead.

Method 4: Use Script Editor

To show hidden files for Mac by script, you can create a script that toggles the visibility of these files. Here is an example of how you can do it:

  1. Find Launchpad in the Applications folder and open it.
  2. Copy and paste the following command into the AppleScript:

    tell application "Finder"
    set status to do shell script "defaults read AppleShowAllFiles"
    if status = "NO" or status = "OFF" then
    do shell script "defaults write AppleShowAllFiles YES"
    do shell script "defaults write AppleShowAllFiles NO"
    end if
    do shell script "killall Finder"
    end tell
  3. After saving the script, click the Run button in the top menu.

This script will check the current file visibility state in Finder and then toggle it to the opposite state. So, running this script will show your hidden files and vice versa if your hidden files are currently visible.

Please note that running this script will restart your Finder, so be sure to save any open work in other Finder windows.

Method 5: Use a File Manager

Many third-party file managers are available for macOS to help you manage files or folders more efficiently, including viewing hidden files. Here, you can use Commander One, a simple and efficient way to show hidden files on MacBook, iMac, and more. Here's how you can do it:

  1. Open Commander One.
  2. Find the toolbar at the top of the application window.

  3. Click the button to show hidden files.

Once you've done this, all hidden files should become visible in Commander One's dual-pane interface.

Method 6: Use Data Recovery Software

Although, the primary purpose of data recovery software for macOS is to help you recover deleted files on Mac. However, when one or more files/folders are hidden intentionally or unintentionally so you cannot find them, this will also be considered a data loss accident. Therefore, such software can usually identify hidden items in the drive. So, you can use them to show hidden files on Mac. Here, you can use iBeesoft Data Recovery for Mac to perform this task; here are the detailed steps:

  1. Download and Install iBeesoft Mac data recovery software.
  2. Click the "Start" button after launching it.

  3. Select the drive where you want to show hidden folders/files and click "Scan."
  4. After completing the scan, it will display all the found data that will be hidden.
  5. Open the same target in Finder and iBeesoft for comparison, and select the part not shown in Finder.
  6. Click the "Recover" button to save them to a new location, which is the hidden files you want to view.


Here are some common frequently asked questions and their answers about showing hidden files in macOS:


Showing hidden files on macOS is a straightforward process. Whether you choose to use the keyboard shortcut, the Terminal command, or third-party tools depends on your comfort level. Remember, these files are hidden for a reason, so proceed cautiously when accessing or modifying them.