Mac hidden files: show them without breaking anything

To show hidden files on a Mac, open a Finder window and press Command+Shift+Period (the full stop key). Hidden items appear dimmed, and pressing the same keys again hides them. The shortcut also works in Open and Save dialogs. For a single hidden folder such as ~/Library, there is a quicker route that changes no setting at all: press Command+Shift+G and type the path. The rest of this guide explains why the shortcut sometimes does not reveal the file you expect, how to make the change permanent, and which of the newly visible items should not be touched.

Three ways macOS hides an item

Hidden files are not one mechanism. Apple's developer documentation, in the section "Hidden Files and Directories" of the File System Basics overview, lists three categories that Finder and the Open and Save panels hide.

Category Examples How it is hidden Revealed by Command+Shift+Period
Dot files and folders .zshrc, .ssh, .gitignore, .config Name starts with a period Yes
Unix directories /bin, /dev, /etc, /sbin, /tmp, /usr, /var Hidden by the system Yes
Explicitly hidden items /Volumes, ~/Library The hidden file flag Yes
Finder's own metadata .DS_Store Kept hidden even when others are shown No

The last row is the one that causes confusion. Eclectic Light, in How to hide files and folders, notes that .DS_Store files stay invisible even when hidden files are shown with the shortcut. If the goal is to find or delete .DS_Store files, Terminal is the tool, not Finder.

The hidden flag can be seen directly in Terminal. On a Mac running macOS 27.0.1, checked by the editorial desk on 9 October 2026, ls -lOd ~/Library returned hidden in the flags column. Running ls -lO / showed restricted,hidden on /bin, /sbin, /usr, /etc, /tmp and /var, and hidden alone on /Volumes, /cores, /dev and /private.

Why Apple hides these items at all

Apple's stated reason, in the same developer document, is to simplify the experience. Finder and the Open and Save panels hide files and directories that a user should never need to handle directly, many of which are system or app resources that cannot or should not be changed by hand. The ~/Library folder was added to the hidden list in Mac OS X 10.7, which is why older guides describe it as visible.

That reasoning matters when deciding whether to leave hidden files showing. The hiding is not a security barrier. Anyone with Terminal or the keyboard shortcut can see everything. It is a filter that keeps the everyday view focused on documents. Security comes from a different layer, System Integrity Protection, which is covered further down. So showing hidden files does not weaken anything. It only removes the filter and adds noise.

The /Volumes folder is a good example of the filter at work. Apple's document describes it as containing a subdirectory for each mounted disk. Finder hides it because it already shows disks in the sidebar under Locations. In Terminal, though, /Volumes is where an external drive or a network share actually lives, so scripts that copy to a drive refer to paths such as /Volumes/Backup/.

The same idea explains why some apps keep their settings in a dot folder inside the home folder rather than in ~/Library. Command line tools come from the Unix tradition, where a leading period has always meant "configuration, not content". Package managers, version control and shell tools follow that convention, and so the home folder of anyone who uses them gradually fills with dot folders that Finder never shows.

Method 1: the Finder shortcut

  1. Click a Finder window to make it active.
  2. Press Command+Shift+Period.
  3. Hidden items appear with dimmed icons.
  4. Press Command+Shift+Period again to hide them.

The change applies to every Finder window at once, not only the frontmost one. It also persists after closing windows. TidBITS, in Reveal Invisible Files on the Mac with a Keystroke, described the same behaviour when the shortcut appeared in macOS Sierra, and readers confirmed it affected all open windows and the Desktop.

Dimmed icons are useful as a warning label. Anything that appears dimmed was hidden for a reason. Treat it as read only unless there is a specific reason to change it.

On the Mac checked for this article, defaults read com.apple.finder AppleShowAllFiles returned 1 while hidden items were showing. That is the setting the shortcut changes behind the scenes.

Method 2: go straight to one folder

Most people who search for this want one folder, not every hidden file on the disk. In that case, do not change the global setting.

Press Command+Shift+G in Finder to open the Go to Folder window. The shortcut is listed on Apple's Mac keyboard shortcuts page. Type or paste the path and press Return.

Common destinations:

  • ~/Library for app settings, caches and support files
  • ~/Library/Application Support for app data
  • /usr/local or /opt for command line tools installed by package managers
  • /Volumes to see every mounted disk by its mount name
  • ~/.ssh for SSH keys and configuration

The folder opens even though it is hidden, and the rest of Finder stays tidy. If the folder will be needed often, press Control+Command+T while it is open to add it to the sidebar. That shortcut is also on Apple's keyboard shortcuts page.

Method 3: Terminal, for permanent or precise changes

Terminal shows everything without changing any setting. ls -la lists dot files, and ls -lO adds the file flags column. This is the most reliable way to see what is really in a folder.

To make Finder show hidden files permanently, the setting is a single preference:

defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder

To turn it off again, run the same command with false. In practice, the keyboard shortcut does the same thing and is easier to reverse, so the Terminal version is mainly useful in setup scripts.

To hide or unhide a specific item without renaming it, use the chflags command:

chflags hidden ~/path/to/folder
chflags nohidden ~/path/to/folder

Eclectic Light describes this as a second way to hide items that leaves the name unchanged. It is the cleaner choice for folders that other apps refer to by name.

Renaming to add a leading period is the other way to hide an item, but Finder resists it. Apple's guide to renaming files states that a name cannot start with a period in Finder. Use mv in Terminal, or chflags hidden, instead.

What to leave alone once it is visible

Showing hidden files makes several system areas easy to reach. Some of them are protected anyway, and some are not protected but are still unsafe to change.

Protected by the system. Apple's System Integrity Protection article lists /System, /usr, /bin, /sbin, /var and the apps that come with macOS as protected. Even an administrator cannot modify them. Attempts fail with "Operation not permitted". There is nothing to break here, but also nothing to gain from trying.

Not protected but risky.

  • ~/Library as a whole. Deleting folders here removes app settings and sometimes data. Apple's renaming guide lists the Library folder among items that should not be renamed.
  • .DS_Store files in shared folders. Deleting them is harmless to data, but Finder recreates them and forgets view settings for that folder.
  • Dot folders such as .git inside a project. Deleting .git removes the entire version history of a repository.
  • .ssh. Removing or changing permissions on files here can lock you out of servers.

Usually safe to edit, with care.

  • Shell configuration such as .zshrc and .zprofile. Keep a copy before editing.
  • .gitignore and similar project files. They are meant to be edited.
  • Caches under ~/Library/Caches for a specific app, when that app is closed.

A useful habit: before deleting anything that was hidden, copy it to a folder on the Desktop first. If nothing breaks after a few days, delete the copy.

Hidden files that show up on other computers

Hidden files have a second life outside the Mac. Items that Finder keeps out of sight become visible the moment a folder is opened on Windows, on Linux, or in a web upload form.

On USB drives and memory cards. Drives formatted as ExFAT or MS-DOS (FAT), the formats Apple's Disk Utility guide describes as compatible with Windows, cannot store some Mac file information natively. When files are copied to such a drive, macOS can write small companion files whose names start with ._, along with .DS_Store files and folders such as .Trashes and .Spotlight-V100. On a Mac these are hidden. On a Windows PC or a television that reads the drive, they appear next to the real files and can confuse anyone receiving the drive.

In shared folders and archives. A folder zipped and sent to a colleague can carry .DS_Store files with it. A project pushed to a code repository can include .DS_Store unless it is listed in .gitignore. These files contain only Finder view settings, so they are not a privacy risk in most cases, but they clutter the recipient's view.

In uploads. Some web forms that accept a folder upload include hidden files. The result can be an extra .DS_Store item in a shared drive or content system.

The practical response is the same in each case. Before handing a folder to someone on another platform, show hidden files with Command+Shift+Period, look at what is actually in the folder, and remove the items that are only there for Finder. For drives that move between a Mac and a Windows PC often, it is worth checking the drive in Terminal with ls -la before ejecting it.

Keeping hidden files visible without clutter

Leaving hidden files on all the time has a cost. Every folder in the home directory gains entries such as .Trash, .CFUserTextEncoding and a dozen dot folders, and the ones that matter become harder to see.

A balanced setup that works for most people:

  • Keep the global setting off, and toggle with Command+Shift+Period only when needed.
  • Add the two or three hidden folders used regularly to the sidebar with Control+Command+T.
  • Use Terminal for anything that needs precision, such as finding every .DS_Store or checking flags.

The switching between Finder and Terminal is where most time goes. For people who do this daily, a file manager with a built in terminal removes one step: the terminal opens in whichever folder is selected, so ls -la shows the hidden contents next to the normal view without typing a path. The features page describes one such tool, and the FAQ covers how it works with existing Finder settings. Using it on the Mac is free.

What to change first

Leave the global setting off and learn two shortcuts: Command+Shift+Period to toggle hidden files, and Command+Shift+G to go straight to one hidden folder. Add ~/Library or any other folder visited weekly to the sidebar. If the work regularly involves dot files inside projects, try a file manager with a terminal built in, such as Atriens, so the hidden and visible contents of a folder are on screen together.

Frequently asked questions

Why do some hidden files still not appear after pressing Command+Shift+Period?

.DS_Store files stay hidden even when other hidden files are shown. Also check that a Finder window was active when the keys were pressed, and that the Period key on the main keyboard was used. Terminal with ls -la shows everything regardless.

How do I hide hidden files again on a Mac?

Press Command+Shift+Period again in a Finder window. If the change was made in Terminal with defaults write, run the same command with false and then killall Finder.

How can I open the Library folder on a Mac?

In Finder, press Command+Shift+G, type ~/Library, and press Return. The folder opens without changing hidden file settings. Press Control+Command+T while it is open to add it to the sidebar.

Is it safe to delete hidden files to free up space?

Generally no. Most hidden files are small configuration files, and some, such as .git or .ssh, hold important data. Large space users are usually app caches in ~/Library/Caches, which can be cleared per app while the app is closed.

Can a file be hidden on a Mac without renaming it?

Yes. Run chflags hidden followed by the file path in Terminal. The name stays the same and Finder hides it. chflags nohidden reverses the change.

Back to all posts