How to See Hidden Files on Mac: Shortcut, Terminal, Library
Press Shift-Command-Period in any Finder window to see hidden files on a Mac, and press it again to hide them. Terminal works too.
By the TopMac team · November 30, 2026 · 6 min read
To see hidden files on a Mac, open a Finder window and press Shift-Command-Period (the full stop key). Hidden files and folders appear dimmed next to the normal ones, and pressing the same keys again hides them. No extra software is needed.
Show hidden files with the Finder shortcut
This is the quickest method and the right one for most people.
- Click the Finder icon in the Dock and open the folder you want to look in.
- Press Shift-Command-Period.
- Hidden items appear with faded icons and names, so you can tell them apart from regular files.
- Open, copy or move them as you would any other file.
- Press Shift-Command-Period again when you are done.
The setting is a toggle that applies to Finder as a whole, not to one folder. If you leave it on, every window shows hidden items until you switch it off. Your home folder is a good place to try it: you will see items such as .zshrc, .Trash and the Library folder appear.
Show hidden files with Terminal
Terminal changes the same Finder setting. It is useful if the shortcut does not respond, or if you want to set this from a script.
-
Open Terminal from the Utilities folder inside Applications.
-
Type the following line and press Return:
defaults write com.apple.finder AppleShowAllFiles YES -
Restart Finder so it picks up the change:
killall Finder
Finder closes and reopens within a second or two, and hidden files are now visible everywhere.
If you only want to look and not change anything, you can also list hidden files inside Terminal itself. Move to a folder with cd, then run:
ls -la
The -a part tells ls to include names that begin with a dot, which it normally skips.
Find the Library folder
The Library folder inside your home folder holds app settings, caches, mail data and other support files. It is the hidden folder people most often need, and macOS gives it three dedicated routes that do not require showing everything else.
Open it once
- In Finder, click the Go menu in the menu bar.
- Press and hold the Option key.
- Library appears in the list. Choose it.
You can also choose Go > Go to Folder (Shift-Command-G), type ~/Library and press Return. The tilde stands for your home folder.
Keep it visible
- Open a Finder window and go to your home folder (Shift-Command-H).
- Choose View > Show View Options.
- Select Show Library Folder.
The checkbox only appears while your home folder is the window in front. Once it is selected, Library shows up in your home folder like any other folder and stays in the Go menu.
Note that a Mac has more than one Library. The one at the top level of the startup disk holds fonts and other items shared by all users, and it is not hidden. The one this section covers is the personal one inside your home folder.
How to hide files again
-
If you used the shortcut, press Shift-Command-Period once more.
-
If you used Terminal, run the same command with
NO, then restart Finder:defaults write com.apple.finder AppleShowAllFiles NO killall Finder -
To stop showing the Library folder, return to View > Show View Options in your home folder and deselect Show Library Folder.
Hide or reveal one specific item
macOS can mark a single file or folder as hidden with the chflags command. This is handy for tucking away a folder you do not want cluttering a window.
chflags hidden ~/Documents/Archive
To bring it back:
chflags nohidden ~/Documents/Archive
Replace the path with your own. A quick way to get it right is to type the command up to the space, then drag the item from Finder into the Terminal window, which fills in the path for you. Keep in mind this hides the item from view only. It is not protected or encrypted, and anyone who shows hidden files will see it.
Why files are hidden on a Mac
Files are hidden for two reasons, and neither is about secrecy.
The first is a convention macOS inherits from Unix: any file or folder whose name starts with a dot is left out of normal listings. Command-line tools and developer software use these "dotfiles" for configuration. Examples include .zshrc for shell settings, .gitignore in code projects and .DS_Store, which Finder creates to remember how a folder is arranged.
The second is a hidden flag that the system sets on items it wants to keep out of the way. The chflags manual describes this flag as hiding an item from the graphical interface. The personal Library folder is the best-known case.
In both cases the goal is to keep everyday folders tidy and to stop people from deleting something an app or the system depends on. That is worth remembering once the files are visible:
- Do not delete or rename hidden items unless you know what they belong to.
- If a guide tells you to remove a settings file, move it to the Desktop first. If something breaks, you can put it back.
- Leave
.DS_Storefiles alone. They are tiny and Finder recreates them. - Turn hidden files off again when you finish, so you do not move one by accident.
When the built-in way is enough, and apps that help
For seeing hidden files, the built-in shortcut is all you need. It is instant, reversible and works everywhere in Finder, so there is no good reason to install an app only for this.
Apps become useful for what you do next:
- Editing a dotfile. Double-clicking a file like
.zshrcmay not open anything sensible because it has no extension. A plain-text editor handles it well. CotEditor is a free, open-source editor made only for macOS that launches quickly and suits small configuration edits. If you already write code, Visual Studio Code does the same job. - Finding out what is using space. Hidden folders such as Library can grow large. GrandPerspective is a free app that draws a disk or folder as a map of rectangles sized by how much room each file takes, and it lets you reveal any item in Finder from there.
Frequently asked questions
What is the shortcut to show hidden files on a Mac?
Shift-Command-Period. Press it in a Finder window to show hidden files and press it again to hide them.
Why are the hidden files greyed out?
Finder dims hidden items so you can tell them apart from normal files. They still open, copy and move in the usual way.
Is it safe to delete hidden files?
Only if you know what the file does. Many hidden files store settings or data that apps rely on, so deleting them can reset preferences or stop an app from working. Move a file somewhere safe first if you are unsure.
How do I find the Library folder on a Mac?
In Finder, open the Go menu and hold the Option key, then choose Library. To keep it visible, open your home folder, choose View > Show View Options and select Show Library Folder.