How can you hide folders and files on macos

Photo of author
stealth
Update:

When you need to hide folders and files on macos, in this tutorial you learn step by step how you can do this.

Whether you want to keep your personal information away from the curious eyes of others or keep sensitive documents and photos in a safer environment, there are various methods and techniques to hide the files and folders on the macos.

How do you hide folders and files on macos (two methods)

With the help of the terminal utility there are two simple methods by which you can hide the folders and files on Mac, without having to be an expert on macos and without meeting applications.

Method 1: Add point (.) In front of the folder or file name

You can hide a file or folder by adding a point in front of his name. For example, if you want to hide a folder called "secret", you can rename it in ".Secret". To do this, open the terminal utility and use the command mv (move) to rename the file or folder:

For this tutorial I take the spit in which I want to hide the "Secret" folder that is on the desktop inside another folder called "ihowto.tips".

Secret Folder on macOS
Secret Folder on macOS

1. Open the terminal utility and execute the order:

mv Secret .Secret

If you have not sailed in the terminal with the "CD" command to the location where the folder you want to hide, you must enter its full path. A simple solution is to pull the folder in the terminal to write the entire path (Path).

The example of my shingle:

mv /Users/laurentiu/Desktop/ihowto.tips/Secret  /Users/laurentiu/Desktop/ihowto.tips/.Secret

After executing this order, the "Secret" folder no longer visible in "Finder" on Macos.

How can you hide folders and files on macos
Hide Secret Folder

You will not be able to rename the name of a folder with "." in front of its name by the classic method of Finder.

“You can’t use a name that begins with a dot “.”, because these names are reserved for the system. Please choose another name.”

Rename Dot Folder
Rename Dot Folder

Method 2: Hide folders and files on macos with chflags.

A second method is to add the attribute ”chflags hidden"For the folder or file you want to hide on the hard. To do this, you will use the entire terminal utility.

Open the terminal utility and execute the order:

chflags hidden Secret_Folder

To make the hidden files visible again, you can use the same order, replacing "hidden” cu “nohidden“.

Both methods above will help you hide folders and files on Macos with the terminal utility.

How can you see folders and files hidden on Mac

If you have folders and hidden files you want to see and access, open the terminal utility and execute the two commands below:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Show Hiden Folders on Mac
Show Hiden Folders on Mac

To hide the files and folders again, replace ”TRUE” cu “FALSE"In the first order line.

Related: How can you hide apps on iPhone or iPad

The hidden files and folders can also be seen from the terminal utility, with the command line ”ls -all“.

Alternatively to the two methods above, you can hide folders and files on Macos with the help of third applications that you can download from the App Store, but we recommend that you be cautious.

I've been writing passionately since 2004 about Windows and Linux operating systems, and since 2010 I've become a fan of Apple University. I'm currently writing tutorials for Mac, iPhone, iPad, Apple Watch, AirPods, and other Apple devices.

Leave a Comment