How to Hide a File on Mac: A Step-by-Step Guide

Do you have private files or folders on your Mac that you want to keep hidden from prying eyes? Luckily, hiding them is easier than you might think. In this guide, we’ll show you how to hide any file or folder on your Mac with just two keywords. Plus, we’ll share a bonus tip on how to prevent others from using the same method to see your hidden files.

To get started, open a terminal window by pressing Command+Space and typing “Terminal” or by clicking the spotlight icon in the menu bar and selecting “Terminal.” In the terminal, type the following command, including a space at the end: “chflags hidden”.

Next, drag and drop the folder or file that you want to hide into the terminal window. The path of the folder will appear in the terminal. Press enter to run the command, and your folder will be hidden. Note that the folder is still there in the same place – it’s just hidden, so the Finder won’t show it by default.

To access the hidden folder, simply press Command+Shift+Period on your keyboard. All hidden folders and files on your Mac will be visible and available to access. To unhide the folder, go back to the terminal and type the same two keywords, but this time, instead of “hidden,” type “nohidden” without a space. Drag and drop the hidden folder again and press enter to make it visible permanently.

Now, you might be thinking that if someone knows this keyboard shortcut to see hidden files, then this method is not at all useful. But don’t worry, we’ve got you covered. To prevent others from using the same method to see your hidden folders and files, go to System Preferences, select Keyboard, and then select Shortcut. From the left sidebar, select “Mission Control.”

You’ll see that two shortcuts do not have any keys assigned – one for notifications and the other for do not disturb. You can assign Command+Shift+Period to one of them. Check the box to turn on this shortcut, and when someone tries to use this command to see hidden files, it won’t work. Instead, it will show “do not disturb” or “notification.” When you want to see hidden files, simply go back to System Preferences and uncheck the box, so the command will be back to default, and it will show hidden files once again.

And that’s it! Just follow these simple steps, and you can easily hide your files and folders on your Mac. No one will be able to access them without your permission.