How to View Hidden Files on Mac
In this article
Hidden files on a Mac are files and folders that macOS keeps out of sight to prevent accidental changes or deletion. They include system configuration files, library caches, and user preference files. This guide shows you three safe ways to reveal them: using Finder, using Terminal, and using a keyboard shortcut. No special tools are required, and all methods work on recent versions of macOS (Mojave and later).
What You'll Need
- A Mac running macOS 10.14 (Mojave) or newer for the Finder method.
- Administrator access (your normal user account is usually enough; you may need an admin password for some Terminal commands).
- No third-party apps are required.
Step-by-Step
Method 1: Using Finder (Graphical)
- Open a new Finder window by clicking the Finder icon in the Dock (the blue face icon).
- Navigate to the folder where you expect hidden files to be. For example, to see hidden files in your home folder, click your username under Favorites in the sidebar.
- Press Command + Shift + . (period) simultaneously. This toggles the visibility of hidden files in that Finder window.
- Hidden files and folders will appear with a slightly translucent appearance. Their names start with a dot (e.g.,
.bash_profile). - To hide them again, press Command + Shift + . once more. The toggle applies only to the current Finder window, so other windows remain unchanged.
Method 2: Using Terminal (Permanent Toggle)
- Open Terminal from Applications > Utilities, or search for it with Spotlight (Command + Space, then type “Terminal”).
- Type the following command and press Return:
defaults write com.apple.finder AppleShowAllFiles -bool TRUE - Restart Finder by typing
killall Finderand pressing Return. Your Finder windows will close and reopen. - Now hidden files are shown in every Finder window, and in the Open/Save dialogs of most apps.
- To revert to the default hidden state, run:
defaults write com.apple.finder AppleShowAllFiles -bool FALSE
thenkillall Finderagain.
Method 3: Using Terminal (Show a Specific File)
- Open Terminal as described above.
- Type the command
chflags nohiddenfollowed by a space, then drag the hidden file or folder from Finder into the Terminal window. The path will be inserted automatically. - Press Return. The file will now be visible in Finder, even without toggling the global setting.
- To hide it again, use
chflags hiddenfollowed by the path.
Common Mistakes
- Pressing the shortcut in the wrong window: The Command+Shift+. shortcut only affects the active Finder window. If you don’t see hidden files, click the window first, then press the keys.
- Forgetting to restart Finder after using the defaults command: The Terminal method won’t take effect until Finder restarts. The
killall Findercommand is essential. - Deleting or moving hidden files: Hidden files are often critical system files. Only view them; avoid modifying or deleting unless you are sure what they do.
- Using the wrong case in Terminal: Commands are case-sensitive. Use
TRUEandFALSEin uppercase as shown.
Tips
- Use the Finder shortcut (Command+Shift+.) for quick, temporary viewing—it’s the safest method because it doesn’t change system settings.
- If you need to see hidden files in an Open/Save dialog, press Command+Shift+. inside that dialog as well.
- To quickly jump to the hidden Library folder in your home directory, hold the Option key while clicking the Go menu in Finder—Library appears in the list.
- Bookmark hidden folders you access often by dragging them to the Finder sidebar while they are visible.
- If you use the Terminal method, consider setting it back to FALSE after you’re done to avoid clutter and accidental changes.
Troubleshooting
- Hidden files still not showing after pressing Command+Shift+.: Make sure you are in a Finder window, not on the desktop. Also check that your keyboard’s Shift key is functional. Try pressing the keys again to toggle off and on.
- The defaults command doesn’t work: Ensure you typed the command exactly, including the spaces and the period after “Finder”. If you get “command not found”, you may have a typo. Re-type it carefully.
- Finder doesn’t restart after
killall Finder: This is normal—Finder relaunches automatically. If it doesn’t, press Option+Command+Escape, select Finder, and click Relaunch. - You can’t see hidden files on an external drive or network volume: The Finder shortcut works on most volumes, but some network drives may not support showing hidden files. Try the Terminal method instead.
- After toggling, hidden files appear but then disappear when you open a new window: That’s expected with the shortcut method. Use the Terminal method for a persistent change.
Frequently Asked Questions
Why are some files hidden on my Mac?
macOS hides files that are essential for the system to run, such as configuration files, caches, and preference plists. Hiding them prevents users from accidentally modifying or deleting critical data.
Is it safe to view hidden files?
Yes, viewing is safe. However, editing or deleting hidden files can break apps or even macOS itself. Only modify them if you know exactly what you’re doing.
How do I hide a file of my own?
You can hide any file or folder by adding a dot to the beginning of its name (e.g., secret.txt → .secret.txt), or by using the Terminal command chflags hidden followed by the file’s path.
Does the Finder shortcut work in all versions of macOS?
Command+Shift+. has worked since macOS Sierra (10.12) and still works in the latest versions. The Terminal method works on all versions.
Can I see hidden files on a USB drive or SD card?
Yes, the same methods work on external drives formatted as APFS, HFS+, or FAT32. For NTFS drives, macOS can only read them by default, but hidden files are still shown with the shortcut.
What is the difference between hidden files and system files?
Hidden files are simply files with the hidden attribute set or whose names start with a dot. System files are files that macOS needs to run, and many of them are hidden, but not all hidden files are system files—some are just user preferences.