How to Show Hidden Files on Mac: Finder and Terminal
Nemo · · 4 min read
To show hidden files on a Mac, open a Finder window and press Cmd+Shift+Period (.). Files and folders whose names start with a dot, like .zshrc or .git, appear dimmed; press the same keys again to hide them. The shortcut also works in Open and Save dialogs. If you want them visible all the time, one Terminal command does it, and in a shell ls -a lists them in any folder.
Why does macOS hide files?
macOS hides two kinds of items. Files whose names start with a dot are hidden by Unix convention: they are settings and caches (.zshrc, .gitconfig, .ssh) you rarely need to see. Other items carry a “hidden” flag, like the Library folder in your home folder, because deleting the wrong thing there can break apps.
Hiding them keeps Finder tidy. The cost comes the day you need one: editing your shell config, checking a .env file, copying a .git folder or clearing an app’s settings. Then you are searching menus for a setting that isn’t there, because Finder has no checkbox for it.
Which ways show hidden files?
| Method | Where | How long it lasts |
|---|---|---|
| Cmd+Shift+Period | Finder windows, Open and Save dialogs | Until you press it again |
defaults write command |
Terminal | Until you change it back |
ls -a |
Terminal | That one listing |
| Go to Folder (Cmd+Shift+G) | Finder | Opens one hidden folder by path |
| Go menu with Option held | Finder | Shows Library in the menu |
How do you keep hidden files visible in Finder?
Run this in Terminal and Finder restarts with hidden files shown everywhere:
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder
To go back, run the same lines with false. The shortcut is usually the better habit: hidden files are noise until the moment you need them.
How do you list hidden files in Terminal?
ls -a lists everything in the current folder, dotfiles included, and ls -la adds sizes, owners and dates. To open a hidden folder in Finder from the shell, open ~/.ssh works. If you’re new to the shell, the guide to a browser with a built-in terminal shows a terminal pane next to the page, and the tmux cheat sheet covers splitting it.
How do you open the Library folder?
Three ways:
- In Finder, hold Option and open the Go menu: Library appears in the list.
- Press Cmd+Shift+G, type
~/Libraryand press Return. - To unhide it for good, run
chflags nohidden ~/Libraryin Terminal.
Be careful in there. Apps keep their settings, caches and data in Library, and removing the wrong folder can reset an app or lose its data.
How do you hide a file yourself?
Two ways, both reversible. In Terminal, chflags hidden ~/Desktop/notes.txt hides one item from Finder and chflags nohidden shows it again. Or give the file a name that starts with a dot. Finder warns you that dot names are reserved for the system, and the file vanishes from view until you press Cmd+Shift+Period. Neither one protects a file: anyone at your Mac can show hidden files in a second. For privacy, use an encrypted disk image or FileVault.
What will Monok’s Files pane add?
Monok is a Mac browser with a native terminal in its panes. Since version 0.1.1 it has a third part: Files, a native file manager pane.
What it is planned to do, and nothing more:
- Type
/in the Magic Bar to open a Files pane at your home folder,/nameto find files and folders by name with Spotlight, or/~/path(or//path) to complete a path. Return on a folder opens it in a Files pane; on a file, opens it in its default app. - Sort by name, date modified, size or kind by clicking the column header.
- Split it next to a page or a terminal with Cmd+D or Shift+Cmd+D, like any other pane.
- Favorites in a sidebar, back and forward, and a path bar.
It is native only: no web page, internal page or JavaScript can reach it, the same rule as the terminal. The home page shows what ships today.
Try it: the current version has the browser, the terminal and Files. Download Monok for Mac, free while in preview, macOS 14 or later.
FAQ
What is the shortcut to show hidden files on a Mac?
Cmd+Shift+Period in a Finder window or an Open or Save dialog. Press it again to hide them.
Why are some files dimmed in Finder?
Dimmed items are hidden files that Finder is showing because hidden files are turned on.
Is it safe to delete hidden files?
Usually not without knowing what they are. Many hold settings for your shell, Git, SSH or apps.
Does Monok have the Files pane now?
Yes, since version 0.1.1. Get it on the download page.