How to access hidden files on a Mac

1.4M views
10 min read

When you look at your desktop, or inside any folder for that matter, on your Mac you’ll see a number (one that will vary depending on how well-organized you are) of file and folder icons. What all of us have in common, however, is a huge range of system files that are hidden just out of view.

There are, however, times when you need to access those files. Most of them are hidden away in the ~/Library folder, but the truth is that the average Mac holds a treasure trove of files and folders that you either no longer need or may want to access for troubleshooting purposes.

dcommander bar

Is it normal that "System" takes up 90GB+ of storage? What does it contain? How to get your System folder under control? 

Why files and folders might be hidden? 

Those of us who have lived online for long enough will remember the Delete System32 hoax, with which trolls encouraged naive PC users to delete their Windows 2000 system directory. It’s not a shock that, since those days, developers have taken more care to hide away files that are essential to their operating systems.

So some of the files Apple hides on Mac are hidden for a reason — they are essential for your macOS to run smoothly, and you shouldn’t remove hidden files Mac uses to operate properly. There are, however, tons of system files among those hidden items that just eat up your storage space for no particular reason. You’ll find all of them in a ~/Library folder. 

Where and how to find the Library folder? 

Before you decide to go into ~/Library, we have to warn you to be cautious. If you’re not sure what each particular file does, it’s better not to edit them. That being said, it doesn’t hurt to see the ~/Library folder contents.

Here’s how to access ~/Library folder: 

  1. Open Finder
  2. Press and hold the Option key 
  3. In the menu, choose Go > Library

library folder mac

1. How to show hidden files on Mac with ease

For those who need a quick answer, the best way to show hidden folders Mac has hidden is to install a utility that can do it. The other way is to dig manually through your ~/Library folder, but that’s not time-efficient and can even put your data at risk if you accidentally delete something you shouldn’t. 

One Switch is one of the best apps to immediately show hidden files and folders. Just click to enable hidden files Mac in the menu bar and you’ll get access to the list of all files your Mac has tucked away. 

show hidden files mac

HoudahSpot is a similar solution, but a more nuanced one. It works great for those who not only want to access hidden files but find a specific file or files with a certain file format. HoudahSpot is an advanced search utility that lets you combine search criteria and find files fast (even if you don’t know their names). So with HoudahSpot, you’ll have to do more manual work but the results will be more detailed too. 

hidden files macos


2. See hidden files on Mac via Finder

As mentioned above, it doesn’t take much to make the hidden files on your Mac visible. In fact, you can check out all of the hidden files on your Mac by following just three easy steps:

  1. In Finder, open up your Macintosh HD folder
  2. Press Command+Shift+Dot
  3. Your hidden files will become visible. Repeat step 2 to hide them again!

This process will also work elsewhere, including your Documents or Applications folders. However, if you know what you’re looking for is in your ~/Library folder and would rather jump straight into that then you can take the following steps instead:

  1. In Finder, hold down Alt and click Go at the top of your screen
  2. Click on Library to open up the, normally hidden, folder

get a file path

Be prepared for one very cluttered looking Desktop if you decide to uncover all the hidden files there. If you’re anything like the average Mac user, most of what you’ll find will be made up of system files and autosaved Microsoft Word documents!

Some users have reported success finding documents that they thought were lost forever after their Mac crashed without saving, which is always a useful tip to have in the back pocket.

3. Unhide files on Mac with Terminal commands

Terminal, a Mac command-line interface, is included in macOS by default and allows you to use command prompts to control your Mac instead of following a potentially complex series of instructions to do the same thing in Finder.

If you’re already familiar with using Terminal, then you might prefer to run the following script to reveal your hidden files:

  1. Open Terminal
  2. Enter the following: defaults write com.apple.Finder AppleShowAllFiles true [Press Return] killall Finder
  3. To hide files again, change the “true” in the step above to “false”

show hidden files cmd

It doesn’t matter too much whether you use Terminal or Finder to make the hidden files on your Mac visible, though you might prefer the latter if you’ve never run scripts on Terminal before, as both routes accomplish the same thing.

One reason you might opt to use Terminal is that it allows you to hide any file or folder on your Mac, which is a great way to avoid that sense of residual curiosity felt by others should they come across a password protected .rar on your desktop! To hide files, just:

  1. Open Terminal
  2. Enter the following: chflags hidden [Press Space]
  3. Drag files or folders to be hidden from Finder into the Terminal window, which will display their paths in Terminal
  4. Press Return to hide

hide files cmd

It doesn’t matter too much whether you use Terminal or Finder to make the hidden files on your Mac visible, though you might prefer the latter if you’ve never run scripts on Terminal before, as both routes accomplish the same thing.

How to hide files on a Mac using Terminal

One reason you might opt to use Terminal is that it allows you to hide any file or folder on your Mac, which is a great way to avoid that sense of residual curiosity felt by others should they come across a password protected .rar on your desktop! To hide files, just:

  1. Open Terminal
  2. Enter the following: chflags hidden [Press Return]
  3. Drag files or folders to be hidden from Finder into the Terminal window, which will display their paths in Terminal
  4. Press Return to hide

To make your files visible again, just repeat the above steps using “chflags nohidden” in place of “chflags hidden.” Of course, the fact that anyone else who knows this trick can also use it to unhide your files means that this isn’t an adequate substitute for other security measures.

4. Use file managers to access hidden files

How to find the path of a file in Mac? Apps like DCommander and Forklift, both of which perform like native macOS apps and function as extensions of Finder, represent great choices if you’re at all uncomfortable using Terminal or digging around in your ~/Library folder.

Because these apps allow you to make hidden files and folders visible (or invisible) using shortcuts or clicking buttons within the apps, they make the whole process incredibly simple. In Forklift, for example, you can show hidden files by:

  1. Clicking View
  2. Selecting View Options towards the bottom of the dropdown menu
  3. Checking the box next to Show Hidden Files

Check Finder preferences to show hidden files

There’s also a button in the toolbar to show and hide hidden files. DCommander has a similar function available, with a Show System Files command, but you need to add it manually to the app’s toolbar:

about mac system files

As you might guess from those subtle differences in terminology, we would suggest that Forklift is more suitable for someone looking for something that really looks and acts like Finder. DCommander, with a larger range of features and toolbar buttons enabled by default, is still intuitive but feels a little more dense.

Whichever you settle on remember that just because these apps make accessing hidden files easy it doesn’t mean that you can’t do some real damage if you start messing around with the wrong thing!

5. Show hidden files using keyboard shortcuts

If you want to show invisible files Mac folders contain, you can use a quick keyboard shortcut. The hidden files will be greyed out but you’ll them — which is a great way to analyze which fraction of space hidden files actually occupy. 

Here’s how to display hidden files Mac with a shortcut:

  1. Open any folder in Finder
  2. Press Command + Shift + Period
  3. See the hidden files appear in the folder

Leave hidden files to automatic cleanup

For some Mac users, the question of how to see hidden files is nothing more than succumbing to curiosity. For others, it’s a necessity for troubleshooting a piece of software or device that’s not performing as it should.

Somewhere in between are those in the pursuit of a few spare gigabytes as their hard drive rapidly fills up. If you’re one of those people looking to clean up useless hidden data then an app like CleanMyMac X might be exactly what you need:

  1. Open up the app and select Smart Scan
  2. Hit Scan
  3. Select Review Details underneath Cleanup to see how much System Junk you can safely delete
  4. Hit Run to remove those unneeded files

cmmx smart scan

An app like CleanMyMac X will free up space just as effectively, probably more so, then you’ll be able to by randomly deleting hidden files and hoping for the best. If you do end up going this route then don’t consider learning more about hidden content a waste of time — at least you’ll know what to watch out for if someone tries to troll you into deleting vital system files!

Best of all, DCommander, Forklift, HoudahSpot, One Switch, and CleanMyMac X apps mentioned above are all available for a free trial through Setapp, subscription with more than 240 macOS and iOS apps from top developers all over the world.

FAQ

How to show hidden files on Mac permanently?

Run the following command in Terminal: defaults write com.apple.Finder AppleShowAllFiles true. This will keep your files permanently visible on Mac. To undo this action and keep hidden files hidden again, run the command defaults write com.apple.Finder AppleShowAllFiles false

How to show hidden files on external hard drive Mac?

Just like with any external device, plug your SD card into the computer and select it in Finder under Locations. Press Command+Shift+Dot to reveal the hidden files.

How to not show hidden files?

Unless you run the Terminal command to keep your hidden files permanently visible, they will remain hidden. If you did enable permanent visibility for these files, open Terminal and run the command defaults write com.apple.Finder AppleShowAllFiles false. If you use the Command+Shift+Dot command to show hidden files, you can use the same command to hide them. 

250+ apps for $9.99
per month

Sign up to Setapp and try them for free.

Security-tested