Show Hidden Files in macOS Finder (⌘+Shift+.)
Quickly toggle hidden files like .htaccess in macOS Finder with ⌘+Shift+. shortcut. No Windows-style checkbox? Use Terminal: defaults write com.apple.finder AppleShowAllFiles true. Show hidden files mac guide with steps and tips.
How do I display hidden files in macOS Finder? (e.g., .htaccess) Is there an equivalent toggle setting like in Windows?
Press Command+Shift+Period (⌘+Shift+.) in Finder to toggle visibility of hidden files (dotfiles like .htaccess) — that’s the quickest way to show hidden files mac (also searchable as “mac показать скрытые файлы”). There isn’t a persistent View checkbox in Finder like Windows File Explorer; to make the change stick use Terminal: defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder (use -bool false to hide again).
Contents
- Show hidden files in macOS Finder (⌘+Shift+.)
- Permanent toggle to show hidden files mac via Terminal
- Searching and opening hidden files (e.g., .htaccess)
- Troubleshooting & safety tips
- Sources
- Conclusion
Show hidden files in macOS Finder (⌘+Shift+.)
Hidden files on macOS are usually “dotfiles” — names that start with a period, for example .htaccess, .bash_profile, or .DS_Store. The fastest way to see them in Finder is the built-in toggle:
- Click a Finder window (or the Desktop) so Finder is the active app.
- Press Command + Shift + Period (⌘+Shift+.). Hidden files will appear immediately; press the same keys again to hide them.
This keyboard shortcut works in every Finder window and acts like a quick “show/hide” switch rather than a persistent View setting — Macworld documents the shortcut and its behavior in Finder windows, and OS X Daily shows the same quick-toggle approach https://www.macworld.com/article/671158/how-to-show-hidden-files-on-a-mac.html https://osxdaily.com/2018/02/12/show-hidden-files-mac-keyboard-shortcut/. Some guides note hidden items appear slightly dimmed or greyed out in Finder after the toggle https://www.avast.com/c-mac-show-hidden-files.
Is there an exact Windows-style checkbox? Not really—Windows has a persistent View > Show > Hidden items setting in File Explorer. macOS gives you a quick keyboard toggle and a Terminal option for a persistent change (next section).
Permanent toggle to show hidden files mac via Terminal
If you want Finder to always show hidden files, use Terminal (Applications → Utilities → Terminal). Type or paste:
# show hidden files
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder
# hide again
defaults write com.apple.finder AppleShowAllFiles -bool false
killall Finder
The killall Finder command restarts Finder so the setting takes effect immediately. You can also use -bool YES/NO or true/false; the -bool flag is explicit and recommended. Community documentation and Q&A threads walk through this exact command set if you want background or variations https://apple.stackexchange.com/questions/5870/how-to-show-hidden-files-and-folders-in-finder.
A quick reminder: when Finder is set to show all hidden files you’ll see system and configuration files too. Don’t edit or delete items you don’t recognize — some are needed by macOS.
Searching and opening hidden files (e.g., .htaccess)
Want to find or edit a single dotfile without toggling visibility?
- List hidden files in Terminal:
ls -la /path/to/folder(the-ashows dotfiles). - Find a file by name:
find ~ -name ".htaccess" 2>/dev/null(searches your home directory). - Open a hidden file directly in TextEdit:
open -e ~/.htaccessor with a specific app:open -a "Visual Studio Code" ~/.htaccess.
If Finder search doesn’t return hidden items for you, use Terminal search commands above. Some users report the shortcut doesn’t affect Finder’s search UI consistently, so command-line tools are the reliable fallback https://www.reddit.com/r/MacOS/comments/169nxci/how_can_i_search_for_hidden_files_and_folders_in/.
Tip: you can also use Finder’s Go → Go to Folder (Cmd+Shift+G) to jump to a folder path quickly; once there, use the shortcut to reveal dotfiles in that window.
Troubleshooting & safety tips
- Shortcut not working? Make sure Finder is the active app (click the Desktop or a Finder window) and press ⌘+Shift+.; check your keyboard layout or any hotkey utilities that might have remapped keys. To force-restart Finder: Option‑right‑click the Finder icon in the Dock → Relaunch, or run
killall Finderin Terminal. - Terminal command appears ignored? Confirm you used
-bool true(ortrue) and rankillall Finder. Verify the current setting withdefaults read com.apple.finder AppleShowAllFiles. - Files look greyed out — that’s normal; Finder dims items that are hidden so they’re visually distinct https://www.avast.com/c-mac-show-hidden-files.
- Be careful editing system files: some files are protected by System Integrity Protection (SIP) and shouldn’t be modified. Don’t disable SIP unless you understand the security implications.
- If you just need to hide/unhide a single file, you can use
chflags hidden /path/to/fileandchflags nohidden /path/to/file(advanced users).
If you’re following a tutorial that tells you to edit .htaccess or similar, make a backup first. Small mistake, big headache.
Sources
- https://www.avast.com/c-mac-show-hidden-files
- https://www.macworld.com/article/671158/how-to-show-hidden-files-on-a-mac.html
- https://apple.stackexchange.com/questions/5870/how-to-show-hidden-files-and-folders-in-finder
- https://discussions.apple.com/thread/7581737
- https://www.reddit.com/r/MacOS/comments/169nxci/how_can_i_search_for_hidden_files_and_folders_in/
- https://appleinsider.ru/mac-os-x/otobrazit-skrytye-fajly-v-macos-prostoj-sposob.html
- https://osxdaily.com/2018/02/12/show-hidden-files-mac-keyboard-shortcut/
Conclusion
Quick recap: press ⌘+Shift+. to show hidden files in Finder — the fastest “show hidden files mac” method; use defaults write com.apple.finder AppleShowAllFiles -bool true; killall Finder to make it persistent. If you run into search or permission quirks, use Terminal commands (ls -a, find, open -e) and proceed carefully when editing system or configuration files.