Show Hidden Files on Mac: Finder & Terminal
To show hidden files and folders on macOS, open Finder and press Command + Shift + . (period) — this toggles hidden items on and off. Alternatively, you can use the Terminal command defaults write com.apple.finder AppleShowAllFiles true and restart Finder.
What Counts as a Hidden File on macOS?
macOS hides files and folders whose names begin with a period (dot), such as .gitignore, .DS_Store, and the ~/Library folder. The system also hides certain system-level directories like /System and /Volumes from normal browsing to prevent accidental modification. These are not secret or encrypted — they are simply flagged with the hidden attribute in the file system. Many applications store preferences, caches, and configuration files in hidden locations like ~/Library/Application Support.
Method 1: Keyboard Shortcut in Finder
The quickest way to toggle hidden files is the keyboard shortcut Command + Shift + . (period). This works in any Finder window and also in the Open/Save dialog boxes of most apps. Press it once to show hidden items, press it again to hide them. The setting is temporary — it resets when you close the Finder window or restart your Mac. This is the safest method because it changes nothing on your system.
Method 2: Terminal Command (Persistent)
If you want hidden files to stay visible across restarts, use Terminal:
- Open Terminal (Finder > Applications > Utilities > Terminal).
- Type:
defaults write com.apple.finder AppleShowAllFiles trueand press Enter. - Restart Finder by typing
killall Finderand pressing Enter.
To revert to hiding them, replace true with false in the same command. This writes a preference to the Finder’s configuration file, so it persists until you change it. Note that this affects all Finder windows and also the desktop.
Method 3: Navigate Directly with Go to Folder
If you just need to access one hidden folder (like ~/Library) without showing everything, press Command + Shift + G in Finder, type the path (e.g., ~/Library), and press Enter. This works even when hidden files are not displayed. It is the least intrusive way to reach a specific hidden location.
Why Does macOS Hide Files in the First Place?
Hiding files is a design choice to reduce clutter and prevent accidental damage. System files and user library folders contain data that, if moved or deleted, can break applications or the OS itself. For example, deleting the ~/Library/Preferences folder could reset all your app settings. The dot-prefix convention comes from Unix, where files starting with a period are not shown by default in directory listings. macOS inherits this behavior from its BSD Unix foundation.
Common Problems and How to Solve Them
Keyboard shortcut not working? Make sure you are in Finder or an Open/Save dialog — the shortcut does nothing on the desktop. If you are using a non-English keyboard layout, the period key may be in a different position; try using the Terminal method instead.
Hidden files appear but are greyed out? That is normal — macOS displays hidden items with a lighter color to distinguish them, but they are fully accessible.
Terminal command didn’t work? Ensure you typed the command exactly, including spaces. After running killall Finder, Finder restarts automatically; if it doesn’t, press Option+Command+Escape and relaunch Finder manually.
Safety and Precautions
While viewing hidden files is harmless, moving or deleting them can be risky. The ~/Library folder contains application support files, caches, and preferences. Removing a cache file may force an app to rebuild it, but deleting a preferences file can reset your settings. Never delete files in /System or /Library unless you are following a specific, trusted guide. If you are unsure, copy the file to another location instead of deleting it. Also, be aware that some hidden files (like .DS_Store) are safe to delete — macOS recreates them automatically.
Alternatives to Showing All Hidden Files
If you need to edit a hidden configuration file, you can often use a text editor that supports opening hidden files directly, such as TextEdit’s “Open” dialog with Command+Shift+G. For developers, using a terminal-based editor like nano or vim lets you edit hidden files without changing Finder’s visibility settings. There are also third-party file managers that display hidden files by default, but the built-in methods above are sufficient for most users.
Frequently Asked Questions
Does the keyboard shortcut work on macOS Sonoma and Ventura? Yes, Command+Shift+. has been available since macOS Sierra (2016) and works on all later versions, including Sonoma and Ventura.
Why can’t I see hidden files in the Finder sidebar? The sidebar only shows folders you have added; hidden files do not appear there unless you navigate to them. Use Command+Shift+G to jump to a specific path.
Will showing hidden files slow down my Mac? No, it only changes what Finder displays. It does not affect performance or background processes.
Can I hide files from other users? The hidden attribute is not a security feature; any user who knows the path can access them. For privacy, use FileVault disk encryption or set proper permissions.
How do I hide a file I created? Rename it with a period at the beginning (e.g., notes.txt to .notes.txt) in Finder, and it will be hidden by default. To unhide it, rename it back.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.