To reveal hidden files on a Mac, open Finder and press Command + Shift + . (period) — this keyboard shortcut toggles hidden files on and off in the current Finder window. You can also use the Terminal command defaults write com.apple.finder AppleShowAllFiles true to make hidden files permanently visible.
What Are Hidden Files on macOS?
macOS hides certain files and folders to keep the system stable and to prevent users from accidentally moving, editing, or deleting critical data. These hidden items typically begin with a dot (.) — for example, .bash_profile, .gitignore, or .DS_Store. The system also hides entire folders like ~/Library, which contains user preferences, application support files, and caches. Hiding these items reduces clutter and protects users from breaking their system. However, there are legitimate reasons to view them: troubleshooting, accessing application data, editing configuration files, or simply understanding how your Mac stores data.
Method 1: Keyboard Shortcut in Finder (Temporary)
The quickest and safest way to reveal hidden files is the Finder shortcut. It works on macOS Sierra (10.12) and later, including all recent versions like Ventura and Sonoma.
- Open a Finder window (click the Finder icon in the Dock).
- Navigate to the folder where you suspect hidden files exist (e.g., your home folder).
- Press Command + Shift + . (period key).
- Hidden files and folders will appear grayed out. Press the same shortcut again to hide them.
This toggle is per-window and resets when you close the window. It’s ideal for a quick look without changing any system settings.
Method 2: Terminal Command (Permanent)
For a system-wide change that persists until you reverse it, use Terminal. This writes a preference that tells Finder to always show hidden files.
- Open Terminal (Applications > Utilities > Terminal).
- Type the following and press Enter:
defaults write com.apple.finder AppleShowAllFiles true - Restart Finder by typing:
killall Finderand pressing Enter.
To revert to hiding them, replace true with false in the same command and restart Finder again. This method is useful if you frequently need to access hidden files, but be cautious: with them always visible, you might accidentally modify system files.
Method 3: Reveal the Library Folder
Many users specifically want to access the hidden ~/Library folder, which contains app data, preferences, and caches. There are two easy ways:
- In Finder: Hold down the Option key and click the Go menu in the menu bar. The Library option appears in the dropdown.
- In Terminal: Type
open ~/Libraryand press Enter. The folder opens in Finder.
This folder is hidden for a reason — deleting or moving its contents can break applications. Only explore it if you know what you’re looking for.
Method 4: Use the Go to Folder Command
If you know the exact path of a hidden file or folder, you can jump directly to it without toggling visibility.
- In Finder, press Command + Shift + G.
- Type the full path (e.g.,
~/.sshfor SSH keys). - Press Enter. The folder opens even though it’s hidden.
This is the fastest way to reach a specific hidden file without changing any settings.
Common Problems and Misconceptions
One common misconception is that hidden files are invisible because they are infected or malicious. In reality, macOS hides system files to protect them. Another issue: the keyboard shortcut doesn’t work on older macOS versions (before Sierra). If you’re on El Capitan or earlier, you’ll need the Terminal method. Also, some third-party file managers (like ForkLift or Commander One) have their own toggle for hidden files, which can be confusing if you’re using Finder simultaneously.
If the shortcut doesn’t seem to work, make sure you’re in a Finder window (not on the desktop) and that the window is active. Also, check that you don’t have a keyboard shortcut conflict in System Settings > Keyboard > Keyboard Shortcuts.
Safety and Best Practices
When hidden files are visible, exercise caution:
- Never delete files that you didn’t create yourself, especially in system folders like
/Systemor/Library. - Don’t move hidden files to different folders; this can break application references.
- After you’re done, hide them again to avoid accidental changes.
- If you’re using Terminal to edit a hidden file, consider making a backup first (e.g.,
cp .bash_profile .bash_profile.backup).
Alternatives and Third-Party Tools
If you need advanced control over hidden files, several free and paid file managers offer built-in toggles. For instance, apps like Path Finder or ForkLift have a “show hidden files� button. However, for most users, the built-in methods above are sufficient. A safer alternative to permanently showing all hidden files is to use the Go to Folder command whenever you need a specific path.
Frequently Asked Questions
Why can’t I see hidden files even after pressing Command+Shift+Period?
Make sure you’re in a Finder window, not on the desktop. The shortcut works per-window; if you close the window, the setting resets. Also, check your macOS version — the shortcut requires Sierra (10.12) or later.
Is it safe to delete hidden files to free up space?
Generally, no. Hidden files are often system files or application data. Deleting them can cause errors or data loss. Instead, use a dedicated cleanup tool or manually clear caches in ~/Library/Caches with care.
How do I hide hidden files again after using the Terminal command?
Run defaults write com.apple.finder AppleShowAllFiles false and then killall Finder in Terminal.
Can I make hidden files visible in the Open/Save dialog?
Yes, press Command + Shift + . while the dialog is open. This works in most apps that use the standard file picker.
What are the most common hidden files on a Mac?
Common ones include .DS_Store (folder view settings), .bash_profile or .zshrc (shell configuration), .ssh (SSH keys), and .gitconfig (Git settings).
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- China’s IPv9 Decimal Network Project Explained
- Fix Wired Earbuds That Only Work in One Ear
- What to Check Before Buying the Dip in Indian Shares
- Cool Raspberry Pi Projects: 15 Ideas for Any Skill Level3
- Terraform vs Kubernetes: Key Differences
- Internet Connectivity in Remote Areas: Options0.80 USD/GB