How to hide files and folders on a Mac
Sharing a computer with other people in your house or office isn’t the best of situations. Sometimes it’s unavoidable, but how do you keep your files and folders private? If you work on a Mac, you can create separate login profiles. It’s not always practical, but it will do in a pinch.
For other occasions, you could opt to hide personal files and folders from prying eyes. This will work if you share your computer, but it also comes in handy for business files. Many of us are working from home now, and if you have sensitive documents or spreadsheets, think about hiding them. Tap or click here to hide folders on a Windows PC.
No matter your situation, you most likely have files on your Mac that you want to keep private. Let’s go over how you can hide files and folders and see them again when needed.
Here’s how to hide folders
It’s a bit more complex to achieve on a Mac than what it is on a Windows-based computer, but the results will be the same.
- You’re going to use the terminal to run a series of commands, so open it by pressing Command+Space, and then type terminal.
- Hit Enter.
- When the terminal loads, type the following and don’t forget to add a space at the end: chflags hidden.
- With the file or folder that you want to hide, drag and drop it into the terminal window.
- This will create a path to where it will be.
- Hit Enter and the file will disappear.
- In the terminal window, it will create a path to where the file is.
Pro tip: You can also hide files or folders through the terminal window by renaming the folder to start with a “.” (period). You can also hide file name extensions, although the process is different.
RELATED: 3 new Mac tips for better online security
How to view hidden folders
Now that your folders are hidden, at some point, you will want to view them again. Again, it’s a bit tricky, but here is how:
- In the Finder menu, click Go.
- At the bottom, click Go to Folder.
- A small window will pop up. The path of the hidden folders that are stored will be typed here.
- There is an easy way to do this. Simply start with the tilde key (~) followed by the path created in the terminal window. If the folder is on your desktop, as an example, the path will start with ~/Desktop/(then the name of the file).
Pro tip: if your folder name contains multiple words, a “” will appear at the end of each word, followed by a space. Either remove the backslashes or make a note of the path before hiding the file.
How to view folders using Open/Dialog
To view hidden files and folders in the Open/Save dialog, press Command+Shift+Period on your keyboard.
RELATED: New malware is coming after Macs and 30K computers have been infected
After pressing the combination, the hidden folder won’t popup immediately. Once the combo is pressed, click on something else on your desktop. When you click on the desktop again, the folder will appear.
How to unhide a folder
To make a folder permanently visible again:
- Open the terminal again by pressing Command+Space.
- Type chflags nohidden (the path of the folder).
- Hit Enter and the folder will be visible again.
If you can’t remember the hidden folder’s path, you can drag and drop it into the terminal window after typing chflags nohidden.
Tags: Apple Mac, commands, computer, files, folders, hidden folders, home, malware, online security, security, terminal