Heimdal Security Blog

How to Hide Folders on Mac

Because I really don’t want to rile up all you wonderful Mac users, I’ve decided to do a follow-up on the whole hiding your folders in plain view dilemma.

It may not apply to Mojave or whatever else Mac OS you’re running, but at least you’ll get an idea of what you’re up against. So, how do you hide folders on Mac?

Get yourself acquainted with the Terminal (Mac’s version of Windows’ command prompt) because, as it happens, it’s the only way to hide folders on Mac without resorting to third-party tools. Let’s dig in.

How to hide folders on Mac using Terminal

There’s also a way to hide folders on Mac, but it involves using the Terminal. Don’t worry; it’s just a couple of command lines. Nothing too fancy or complicated. So, here’s how to hide files/folders using Terminal.

How to hide folders on your Mac by using Terminal Aliases

Aliases are macros or shortcuts to various commands. Albeit temporary, we can easily turn this into a more permanent solution. Again, you will need to fiddle around with the Terminal. So, here’s what you’ll need to do:

That’s about it. Now, the next time you will launch Finder, all desired folders will be hidden.

How to Hide Folders on Mac using FileVault

If you really don’t want to trouble yourself with code, there’s a very easy and extremely fast way to hide your folders on Mac, by using the FileVault.

Basically, it turns your hard drive into a Fort Knox-like vault that cannot be opened without the proper cipher, which in this case is the username and password associated with your admin account.

Yes, I know it’s like curing the disease by killing the patient, but I did say that it’s the easiest way to go about hiding your folders. Anyway, here’s what you’ll need to do, should you choose to use FileVault for masking your files, folders, and everything in between.

That’s it! Now FileVault will begin encrypting all the data on your drive. Depending on your specs, this process can take anywhere from a couple of hours to a few days.

Don’t worry too much about ending up with a potato computer; you’ll still be able to surf the web, watch movies, or play games because everything happens in the background.

One more thing: don’t forget to hook up your Mac to the power outlet. You really wouldn’t want to run out of juice in the middle of a procedure involving the drive on which your entire data is stored.

Even more ways to hide files and folders on your Mac

As they say, there’s more than one way to skin something (please don’t say “cat”). So, if you found that the methods described are much too difficult, here are a couple of more ways to hide folders on Mac.

Using the “mv” command

The “mv” command in Terminal moves a file or folder from one place to another. How does this help you? Here’s the trick: the “mv” command moves the folder from its original location to a period folder.

Now, by default, period folders are hidden because they contain system-critical information. Basically, it’s the same thing as moving files or folders to your System32 folder in Windows.

To make files invisible in this manner, open Terminal and type in mv filename .filename. Replace “filename” with the name of the file you want to hide and the “.filename” parameter with the name of the system-protect file.

Deploy Apple’s Developer Tools

If you’re in the mood to do a bit of tweaking, download and deploy one of Apple’s Dev Tools and enter the following command in Terminal: setfile -a V <name of the file you want to hide>. The name of the file should follow the “V” parameter without the “<>”. This command will set the file’s attribute to invisible.

Dump everything in the Library folder

When everything else fails, try the Library folder. It’s hidden by default, making it the ideal place to store top-secret stuff. Just fire up your Finder, navigate to Finder, right-click, create a new folder, and drag all the files in there.

Use third-party file-hiding software

You can also use special software to keep your folders away from prying eyes. The best ones are Altomac and Hide Folders. However, there are also open-source alternatives such as AES Crypt, Axcrypt, or File Lock PE. Give them a try if you’re looking to beef up your account’s privacy.

How to access hidden files and folders on Mac

Great! Now that your folder’s out of sight, out of mind, let’s see how we go about accessing it. There are three ways to access hidden files and folders.

Method 1 – Using the Go to Folder function

From the Go menu, select Go to Folder. In the dialog box that appears on your screen, type in the path of your hidden folder. Don’t forget to include the “~” sign before the path.

It should look something like this: “~/Desktop/MyHiddenFiles”

Method 2 – Using the Open/Dialog function

Double-click on Finder and select Desktop from Favorites. Press the Show items as icons, in a list, in columns, or in the library (the pictogram looks like a rectangle divided by to straight lines). You may need to perform this operation a couple of times before the folder becomes visible.

Method 3 – Show hidden files in Finder

It’s possible to see a hidden file in Finder, but you will need to tinker a bit with Terminal. So, fire up your Terminal, and type in the following line:

defaults write com.apple.finder AppleShowAllFiles TRUE

Press Return to continue. After that, please type in or paste the following line:

killall Finder

Again, press return, go to Finder, and there you are – what was once hidden, can now be seen. Enjoy!

Wrap-up

That’s it on how to hide folders and files on a Mac computer. Know any other methods? Hit the comments section and let me know.