How to Show Hidden Files on a Mac

The File System Cloaking Vector

The macOS operating system is built upon a Unix foundation, which relies on thousands of critical configuration files and system directories to function. To prevent standard users from accidentally deleting the kernel, Apple engineered a cloaking mechanism that completely hides any file or folder that begins with a period (e.g., `.bash_profile` or `.Trash`). If you are a developer attempting to modify an Apache server config or an advanced user hunting down hidden application caches, you must execute a command to pierce this cloaking shield.

How to Show Hidden Files

Apple provides two distinct methods for uncloaking data: a rapid hardware interrupt for temporary visibility within the GUI, and a permanent Terminal override.

1. The Hardware Execution (The GUI Method):
* This is the fastest and safest method. It instantly uncloaks the files within your current Finder window.
* Open a Finder window and navigate to the directory you wish to interrogate (e.g., your Home folder).
* Press and hold the following three keys simultaneously: Command (⌘) + Shift + . (Period).
* The Finder window will instantly flash. The hidden Unix files (like `.DS_Store` or `.zshrc`) will materialize.
* Visual Indicator: macOS renders these newly revealed files as slightly transparent (ghosted) to remind you they are sensitive system assets.
* To re-engage the cloaking mechanism, simply press the identical three-key combination again.
2. The Terminal Override (The Permanent Method):
* If you need the files uncloaked permanently across the entire operating system, you must modify the Finder’s master preference file.
* Open the Terminal application (found in Applications > Utilities).
* Type the following cryptographic command exactly as written, then press Enter:
defaults write com.apple.finder AppleShowAllFiles YES
* The command is executed, but the Finder application is currently running in RAM using the old rules. You must force the Finder to reboot and read the new configuration.
* Type the following command and press Enter:
killall Finder
* The desktop will vanish for a split second and reappear. All hidden files across the entire OS are now permanently visible.

Get the best tech tips delivered straight to your inbox.

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