Quick Links

macOS hides many system files by default, but how can you reveal them if they're necessary for troubleshooting purposes? Fortunately, you can use any of the following methods to easily see all the hidden files or folders on your Mac.

View Hidden Files With a Mac Keyboard Shortcut

The easiest way to view hidden files and folders on your Mac is with a keyboard shortcut. Simply head to your desired directory in Finder and press Command + Shift + Period (.) on your keyboard.

Mac showing hidden files in the Macintosh HD directory

Now, you may see a bunch of translucent files or folders in this directory. These are the ones that are hidden in macOS. If you don't see any, it means there are no hidden files in this directory.

You can repeat this keyboard shortcut to hide these files again from plain sight. This is just one of the several useful Mac keyboard shortcuts that make your life easier.

This keyboard shortcut will also unhide hidden files and folders in other directories. So, remember to press Command + Shift + Period (.) once more to hide them again.

Show All Hidden Mac Files Using Terminal

Another way to view all hidden files on your Mac is with a Terminal command. Open Terminal on your Mac from Applications > Utilities in Finder or by using Spotlight (Command + Space).

Enter the following command to view hidden files or folders and hit Return to execute it:

        defaults write com.apple.finder AppleShowAllFiles TRUE
    

You can also use the word YES at the end in place of TRUE.

Then enter the following command and hit Return to restart Finder:

        killall Finder
    
Terminal command for unhiding all hidden Mac files

Now, all hidden files or folders on your Mac should be visible.

If you don't enter the killall Finder command, you'll need to manually close and reopen Finder before you can view all the hidden files and folders on your Mac.

Once you're done accessing these hidden files, you can hide them again by entering the following command and hitting Return:

        defaults write com.apple.finder AppleShowAllFiles FALSE
    

You can also use the word NO at the end in place of FALSE. But remember to enter the killall Finder command after this as well.

See Hidden Files in a Directory Using Terminal

Perhaps you don't want to unhide all the files and folders on your Mac. Instead, you want to view hidden files in a particular directory. In that case, you need to head to the directory in Terminal using the cd command.

For example, if you want to view hidden files on your desktop, type the following in Terminal and hit Return:

        cd desktop
    

Then, enter the following Terminal to list all hidden Mac files in that directory:

        ls -a
    
Terminal commands to show hidden files in a directory

The hidden files will be listed in Terminal, but they will still remain hidden on your Mac. To actually unhide one of them, type the following command followed by the file or folder name and hit Return:

        chflags nohidden [FILE NAME]
    

Replace [FILE NAME] with whatever file or folder you want to unhide. In my example, I chose to unhide a folder named "Dubai" by typing chflags nohidden Dubai.

chflags nohidden command in Terminal

To hide this file again, you can type the following command, add a space, and drag and drop the file into the Terminal window. Then, hit the Return key:

chflags hidden

The above Terminal command is just one of the many ways to hide files on your Mac. Alternatively, you can use FileVault to create invisible folders or rename files with a period (.) before their names to make them disappear from plain sight.

Hiding a folder on your Mac doesn't hide the files inside it. Even if others won't be able to see your hidden folder, you should also consider hiding these files for extra security.

Remember that many files and folders are hidden on your Mac for a reason. So make sure you know what you're doing when accessing hidden files that are necessary for macOS to operate.