How to Show Hidden Files on Mac

By default, the macOS operating system is designed to be as clean, streamlined, and user-friendly as possible. To achieve this, Apple intentionally hides thousands of critical system files, background caches, and complex library directories from the standard Finder view. While this prevents inexperienced users from accidentally deleting essential files and breaking their computer, it can be incredibly frustrating for power users. If you need to clear out a stubborn application cache, modify a `.htaccess` file for web development, or edit a configuration script, you must know how to show hidden files on Mac.

In this advanced macOS guide, we will explain the safest, fastest keyboard shortcut to reveal hidden files on the fly, how to permanently unhide them using the Terminal, and the crucial precautions you must take when navigating these sensitive directories.

Why Are Files Hidden in the First Place?

macOS is built on a Unix foundation. In Unix-based systems, any file or folder name that begins with a period (e.g., .Trash or .ssh) is automatically classified as a hidden file and rendered invisible to the graphical user interface.

Apple hides these files because they are the lifeblood of the operating system and your installed applications. They contain application states, saved passwords, deep system configurations, and developer tools. Deleting or moving the wrong hidden file can cause an application to crash instantly, or in severe cases, prevent your Mac from booting up altogether.

Method 1: The Keyboard Shortcut (The Safest Method)

Introduced in macOS Sierra, Apple finally added a native keyboard shortcut to instantly toggle the visibility of hidden files directly within the Finder. This is the absolute best method for 99% of users because it allows you to briefly view a hidden file, make your changes, and then instantly re-hide everything to maintain a clean workspace.

Step 1: Open the Target Folder

Open a new Finder window and navigate to the specific directory where you suspect the hidden files reside (for example, your main Macintosh HD root directory, or your user Home folder).

Step 2: Execute the Shortcut

Hold down the following three keys simultaneously on your keyboard:

Command (⌘) + Shift + Period (.)

Step 3: Interact with the Hidden Files

Instantly, dozens of new files and folders will fade into view. You will notice that the icons for these newly revealed items appear slightly transparent or “greyed out.” This translucent styling is Apple’s visual cue to remind you that you are interacting with a sensitive, hidden file.

You can now double-click to open, edit, or copy these files exactly as you would a normal document.

Step 4: Re-hide the Files

Once you have finished your troubleshooting or development work, it is highly recommended to hide the files again to prevent accidental deletions. Simply press Command + Shift + Period again, and the translucent files will instantly vanish from the Finder.

Method 2: Using the Terminal (For Permanent Visibility)

If you are a web developer or system administrator who constantly needs to interact with hidden .git folders or server configuration files, constantly pressing the keyboard shortcut can become tedious. You can use the Terminal to force macOS to display hidden files permanently.

Step 1: Launch the Terminal

Press Command + Space to open Spotlight Search, type Terminal, and press Enter to launch the command-line interface.

Step 2: Enter the Write Command

You need to execute a command that alters the default preferences of the Finder application. Copy and paste the following command exactly as written, then press Enter:

defaults write com.apple.finder AppleShowAllFiles TRUE

(Note: The terminal will not provide any success confirmation message; it will simply move to a new line).

Step 3: Relaunch the Finder

The preference has been changed, but the Finder application needs to be restarted for the visual change to take effect. Copy and paste the following command and press Enter:

killall Finder

Your desktop icons and Finder windows will flash briefly as the application restarts. All hidden files across your entire operating system will now be permanently visible.

How to Revert the Terminal Change

If you ever want to revert back to the default, hidden state, open the Terminal and run the exact same commands, but change “TRUE” to “FALSE”:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

How to Access the Hidden Library Folder

The most commonly accessed hidden directory on a Mac is the user ~/Library folder. This folder contains all the application support files, caches, and preferences for the software you use daily. If an app is severely misbehaving, clearing its cache in the Library folder is often the only fix.

There is a specific trick just for accessing this folder without needing the global keyboard shortcut:

  1. Open a Finder window.
  2. Click on the Go menu located in the very top menu bar of your screen.
  3. Notice that “Library” is missing from the list.
  4. Press and hold the Option (⌥) key on your keyboard.
  5. The Library option will magically appear in the drop-down menu. Click it while holding the Option key to instantly jump inside the hidden folder.

Frequently Asked Questions

Can I hide my own personal files using this system?

Yes. If you rename any standard file or folder to start with a period (e.g., changing Finances.pdf to .Finances.pdf), macOS will instantly hide it. However, if you attempt to do this in the Finder, the system will issue a warning asking if you are absolutely sure you want to make the file invisible.

Will showing hidden files expose viruses?

Merely making the files visible in the Finder does not “expose” your Mac to malware or activate any malicious scripts. It simply changes the graphical display settings. However, it does expose those critical files to you, increasing the risk that human error could delete something important.

Gaining access to the underlying structure of macOS transforms you from a basic user into an empowered administrator. By knowing exactly how to show hidden files on Mac, you unlock the ability to deeply troubleshoot misbehaving software, clear out massive hidden caches, and fully control your development environments.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.

Receive our best articles and tips delivered straight to your inbox.