Home > News Tips

How to Hide Files and Folders on Mac (Step by Step)

Updated on Thursday, May 16, 2024

iBoysoft author Jessica Shee

Written by

Jessica Shee


How to Hide Files and Folders on Mac

You have good reasons for hiding some of your files or folders. For example, you may not want somebody to get access to your sensitive or confidential while snooping on your Mac. You may want to keep some important information private in the Home Folder on Mac while sharing the user account with others, in case they conduct any unwanted modifications to your files. 

There are plenty of ways to hide files on Mac. Some of them are easy while others are slightly complicated. Read this article to find 7 ways to make your folders invisible on Mac

How to hide files on Mac with Terminal

You can hide any files or folders with this Mac Terminal command without the username and password. Don't worry. It is very straightforward and 

You can hide any files or folders with this terminal command without the username and password. Don't worry. It is very straightforward and easy.

  1. Launch the Terminal app by going to Finder > Applications folder > Utilities folder. Alternatively, you can use the Spotlight search by pressing Command + Space key and searching for the Terminal app.
  2. Type the following command in the Terminal window.  
    chflags hidden  
    Hide folders on Mac with Terminal
  3. Open the Finder app and find the folder or file you wish to hide and drag and drop it onto the Terminal window. You will see the file path on Mac. Remember it so that you can access it again.
  4. Press Enter/Return key and the item will disappear.

To access the vanished files on Mac, click Go and Go to Folder on the Apple menu bar from the desktop. Type in the file path or folder path and click Go.

Create a hidden folder and move files to it

Another way to make your important files invisible from prying eyes is to create a new hidden folder and move the files you want to hide to it. To do that, you will need the "mv" command in Terminal, which moves a file or a folder from one place to another.

How to make a folder hidden with the mv command:

1. Open Terminal.

2. Type in the following command. This command will create a new hidden folder with a period at the beginning of its name. In Mac OS X or macOS, folders with such names are hidden by default.

mkdir .hiddenfolder

 Tips: you can change the name of the hidden folder to the one you like.

3. To hide a single file, type the following command.

mv filename .filename


mv filename .hiddenfolder

4. To hide a single folder, run the following command.

mv foldername .hiddenfolder

Hide files or folders on Mac with a third-party solution

If you think command lines are too confusing, don't worry. There are a few other ways to dismiss your folders from visible paths.

iBoysoft MagicMenu is a Mac right click enhancer with a wide variety of useful tools. It adds new file creation, screen capture, move/send files to a target path, quick access, hiding items, and many more shortcuts to your right-click menu. With it, your work efficiency will be greatly improved and your desktop will be a lot cleaner.

Mac right click enhancer

How to hide all folders, icons, and files from Mac's desktop:

  1. Free download and install iBoysoft MagieMenu on your Mac. This menu bar utility support macOS 10.13 - macOS 12.
  2. Right-click the blank space on Mac's desktop.
  3. Select the Common option and select Hide All Items from the context menu.

Hide all files and folders from Mac desktop

iBoysoft MagicMenu can also work as file-hiding software. Open the disk or folder where the folder you want to hide is, select and right click on it, and then select Hide Selected Items in the Common context menu.


Move folders to the hidden-by-default Library folder

Your /Library folder is hidden on macOS by default. The only way to access the folders and files in it is to use the Finder's Go menu.

To hide folders in the Library:

  1. Click Go and select Go to Folder from the Apple menu bar on the desktop.
  2. Type in /Library and click Go or hit Enter/Return key.
  3. Create a new folder there or just drag the files or folders you want to hide into it.

Use Apple Developer Tools

Another method that is worth mentioning is to make your folders invisible with Apple's Developer Tools. In this way, you are setting the visibility attribute of the folder to invisible. You have plenty of easier ways above to hide info on Mac, so just take this method as the last resort.

  1. Have Apple's Developer Tools installed on your Mac.
  2. Open Terminal and run the command.setfile -a Vfoldername

You can undo this by repeating the process, but the command will use a lower-case v.

Protect your folders with FileVault

FileVault is Mac's built-in encryption method to keep all the information on a disk you select secret. Compared with other methods, turning on FileVault to hide files is not only efficient but provides better security.

  1. Click the Apple logo and select System Preferences.
  2. Click Security & Privacy.Turn on FileVault to hide files
  3. Hit the FileVault tab and click the padlock at the corner to allow changes.
  4. Log in with your credentials and click Turn On FileVault.Mac FileVault
  5. The first time you enable FileVault, you will be asked to select the recovery method between iCloud or generating a local recovery key. This code is very important because you will be using it to unlock a FileVault-encrypted disk in case you don't remember the password.
  6. Click on Continue to start encryption.

FileVault will start encrypting and hide all your data on your drive from peepers.

Move files to another user account

If you have to frequently share the same user account with other people, the above method may not be safe enough. Other people can still get access to your hidden folders or files by using the Terminal or other tricks.

Mac allows you to create multiple user accounts and limits a user to access files and folders of a different account. You can take advantage of this feature and put some of your confidential information into a new user account.

  1. Click the Apple logo and go to System Preferences.
  2. Click Users & Groups.Move files to another user account to hide them
  3. Click the lock and enter your username and password to allow changes.
  4. Click the + button to create a new user account
  5. Set up all the details of the profile and click Create User.

Now your Mac will have a second account that you can use to hide files and folders. Move the data you want to hide from the main user account and turn off file sharing in the System Preferences > Sharing.

In the end

Hiding files or folders on Mac is common these days, especially when you are sharing the same user account with your coworkers or friends. To protect your sensitive data against unintentional deletion, malicious modification, or praying, find the best way to make your folders and files invisible in this article.