How to View Hidden Files on a Mac Using Terminal

The Core Configuration Vector

While modern versions of macOS allow you to toggle hidden files using a simple keyboard shortcut (Command + Shift + Period), older systems or heavily managed enterprise environments often disable this graphical feature. When configuring Apache servers, editing bash profiles, or troubleshooting deep library corruptions, administrators must occasionally rely on hardcoded Terminal commands to force the Finder to universally render every hidden file and directory on the hard drive.

How to View Hidden Files via Terminal

You can modify the core preferences of the Finder application by explicitly writing a new true/false variable directly into its configuration plist.

1. Open the Terminal application (found in Applications > Utilities).
2. To rewrite the Finder’s default behaviour, execute the following command exactly as written (it is case-sensitive):

defaults write com.apple.finder AppleShowAllFiles -bool true

3. The command executes silently. However, the Finder application is currently running in memory with its old settings. You must force the Finder to reboot and read the new configuration. Execute the following command:

killall Finder

4. Your desktop icons will briefly disappear and reappear as the Finder restarts. All hidden files (prefixed with a dot) will now be fully visible across your entire system.
5. To reverse this change and hide the files again, repeat the process but change true to false:

defaults write com.apple.finder AppleShowAllFiles -bool false; killall Finder

This command-line approach guarantees visibility regardless of any graphical interface limitations.

Get the best tech tips delivered straight to your inbox.

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