Affiliate Disclosure
If you buy through our links, we may get a commission. Read our ethics policy.

How to see hidden files and folders in macOS

Last updated

While macOS allows users to see the majority of the files their Mac holds, not all files are immediately accessible in Finder, with some kept from view to prevent inadvertent changes or deletion. AppleInsider shows how to gain access to those hidden files and folders.

Operating systems typically have some form of file-hiding functionality built in, and macOS is no exception. Many files or folders are hidden all across the Mac's file system, with the main goal of preventing curious users from mistakenly deleting an important folder or changing a critical file that could cause major problems to macOS.

Not everything hidden by macOS is that hazardous, as apps are also using the feature to help preserve a user's work. For example, a word processor could create a temporary copy of a file currently being used, or a file to flag that another file in a folder needs to be protected from other activities while it is in use elsewhere.

For the adventurous, it is possible to gain access to the hidden files and folders, but the process will differ depending on the operating system, and if you want to have permanent access to said files.

Keyboard Shortcut

Apple has included an easy way to see the files for those using macOS Sierra and newer releases. A keyboard shortcut can be used to toggle between making the files visible or hiding them again.

Open Finder and navigate to the folder you wish to use. Press the key combination Command-Shift-. (Period) to toggle between the two states.

Terminal

This method is meant for macOS versions older than Sierra, but will also work in both Sierra and High Sierra.

Open the Terminal. This can be found by opening the Finder, selecting Applications, then the Utilities folder.

Enter the following string into the terminal, then press enter:

defaults write com.apple.finder AppleShowAllFiles true; killall Finder

This string performs two tasks. The first section before "true" alters a setting within macOS to automatically show all files. The second "killall Finder" element effectively restarts the Finder, refreshing your view to show hidden files.

If you wish to reverse the setting, open Terminal and enter the same command, except changing "true" to "false" in this way:

defaults write com.apple.finder AppleShowAllFiles false; killall Finder

Again, press enter.

Further Thoughts

The files and folders are typically hidden for a very good reason, namely to prevent anyone from accidentally meddling with their operating system and applications in a potentially catastrophic way. Generally speaking, it's best to leave these files alone unless there is a good reason to access them.

If you do feel the need to meddle with these hidden items without any constructive purpose, it is advised to avoid doing so on any mission-critical systems, and to make backups beforehand, just in case any data is lost.



23 Comments

backstab 11 Years · 138 comments

Nope. Not getting the toggled view.
What am I missing?

edit: I got it. Requires viewing system level folders in Finder. (I could sworn "all / any' folders had at least 1 or 2 invisibles. guess not anymore)

MacPro 18 Years · 19845 comments

OMG That is Sooo easy thank you.  I never knew that!  Command Shift Period works so much faster than using Transmit which is how I've been doing it for years!

blastdoor 15 Years · 3594 comments

MacPro said:
OMG That is Sooo easy thank you.  I never knew that!  Command Shift Period works so much faster than using Transmit which is how I've been doing it for years!

I wonder how many more of these little gems are lurking in OSX. 

I only recently realized that by holding 'option' while right-clicking on a file in the Finder, you can copy the pathname of a file rather than the file itself. 

Mike Wuerthele 8 Years · 6906 comments

blastdoor said:
MacPro said:
OMG That is Sooo easy thank you.  I never knew that!  Command Shift Period works so much faster than using Transmit which is how I've been doing it for years!
I wonder how many more of these little gems are lurking in OSX. 

I only recently realized that by holding 'option' while right-clicking on a file in the Finder, you can copy the pathname of a file rather than the file itself. 

There are literally thousands of them.

blastdoor 15 Years · 3594 comments

I was hoping this would involve an AR app on the iPhone --- point your iPhone camera at your Mac screen and suddenly you see all the hidden files ;-)