TechBuzzPro

How to Hide Files on Mac From Family Members

· 6 min read · Mac

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can hide files on your Mac from family members in a few reliable ways: move them into a hidden folder, rename them with a leading dot, use a password-protected disk image, or store them in an account only you can log into. The quickest method is a disk image created with Disk Utility, because it is encrypted and asks for a password every time it is opened. Hidden folders and dot-files stop casual browsing but do not stop anyone who knows where to look, so pick the method that matches how much privacy you actually need.

One thing to understand first: macOS does not have a single "hide from other users" switch. What it has is a set of techniques that range from cosmetic (hidden folders) to genuinely secure (encrypted disk images and separate user accounts). If the people you live with share your login, nothing on your own account is truly private from them unless it is encrypted. If everyone has their own login, macOS already keeps your home folder separate, and you only need to protect against someone using your account while you are away.

What You'll Need

  • A Mac running a current version of macOS. Menu labels can differ slightly by version, device and region, so if a name does not match exactly, look for the closest equivalent.
  • Your administrator password, for creating a disk image or a new user account.
  • Enough free disk space to duplicate the files you want to protect, if you use a disk image.
  • Somewhere safe to record the disk image password. Losing it means losing the files.

Step-by-Step

Method 1: Hide a folder with Terminal (quick, not secure)

  1. Open Terminal from Applications > Utilities.
  2. Type chflags hidden, then a space, then drag the folder from Finder into the Terminal window. The full path appears automatically.
  3. Press Return. The folder disappears from Finder.
  4. To bring it back, type chflags nohidden, a space, drag the folder in again, and press Return. You can also press Command+Shift+Period in Finder to toggle visibility of hidden items.

This hides the folder from normal browsing but does not protect it. Anyone who knows the Command+Shift+Period shortcut will see it immediately.

Method 2: Rename a file with a leading dot

  1. In Finder, select the file or folder and press Return to rename it.
  2. Put a period at the very start of the name, for example .taxes.pdf.
  3. Press Return and confirm the change when macOS warns you that the name will make the item hidden.
  4. Reverse it by renaming the file without the leading period.

Same caveat as above: this is a visibility trick, not security.

Method 3: Create an encrypted disk image (recommended)

  1. Open Disk Utility from Applications > Utilities.
  2. Choose File > New Image > Image from Folder. Select the folder you want to protect and click Choose.
  3. Give the image a name that does not advertise its contents. Under Encryption, choose 128-bit or 256-bit AES encryption.
  4. Enter a strong password and leave the password hint blank, or make the hint useless to anyone else. Click Choose.
  5. Set Image Format to "read/write" if you want to add files later, then click Save.
  6. Wait for the image to be created, then delete the original folder and empty the Trash. Your files now exist only inside the encrypted image.
  7. To use it, double-click the .dmg file, enter the password, and the contents mount like a drive in Finder. When you are done, eject it from the Finder sidebar or by right-clicking its desktop icon.

This is the method to use when privacy actually matters. Without the password, the contents are not readable, even by someone who finds the file.

Method 4: Use a separate user account

  1. Open System Settings and go to Users & Groups.
  2. Add a new user account with a password only you know, and set it as an administrator if you need full access.
  3. Log in to that account when you want to work on private files. Fast user switching, if enabled, lets you jump between accounts without logging out.
  4. Make sure your own account is set to require a password after sleep or screen saver in System Settings > Lock Screen.

Other people using their own accounts cannot see your home folder contents through Finder, though an administrator account on the same Mac can reset passwords and access files. Encryption is still the stronger protection.

Method 5: Keep private files out of Spotlight and Recent Items

  1. Open System Settings > Siri & Spotlight and review the search results categories.
  2. For a folder you want excluded, open System Settings > Spotlight, or use the Privacy tab in older versions, and add the folder to the excluded list.
  3. Clear recent items from the Apple menu under Recent Items if you do not want filenames showing there.

Common Mistakes

  • Assuming a hidden folder is private. It is not. Anyone who presses Command+Shift+Period in Finder sees it.
  • Forgetting the disk image password. There is no recovery. Write it down somewhere outside the Mac.
  • Leaving the original folder in place. If you create a disk image but do not delete the source folder, the files are still visible.
  • Leaving a disk image mounted. An open image is readable by anyone at the keyboard. Eject it when finished.
  • Trusting the Trash. Deleted files stay in the Trash until you empty it, and anyone can restore them.
  • Sharing your login. If family members know your password or use your account, hidden files and recent items are all visible to them.

Tips

  • Name the disk image something boring, like Archive.dmg, rather than something that invites curiosity.
  • Set your Mac to require a password immediately after sleep in System Settings > Lock Screen.
  • Use FileVault, found in System Settings > Privacy & Security, so the whole disk is encrypted if the Mac is stolen or someone boots from another drive.
  • Keep a backup of important encrypted files somewhere else, since a corrupted disk image with no backup means permanent loss.
  • If you only need to stop a child from stumbling on a file, hiding is enough. If you need to stop a determined adult, encrypt.

Troubleshooting

  • The hidden folder is still visible. Press Command+Shift+Period in Finder to toggle hidden items off, and confirm the chflags hidden command ran without an error in Terminal.
  • The disk image will not open. Check Caps Lock and keyboard layout, since the password is case-sensitive. If the password is truly lost, the data cannot be recovered.
  • Files vanished after creating the image. They are inside the mounted image. Open the .dmg and copy them out.
  • Spotlight still shows filenames. Add the folder to the Spotlight exclusion list, then wait a minute for the index to update.
  • Someone else can still see your files. They are probably logged into your account. Change your login password and set up separate accounts.

Frequently Asked Questions

Can I hide files without using Terminal?

Yes. Renaming a file with a leading period, or using an encrypted disk image in Disk Utility, both work entirely through Finder and Disk Utility.

Is a hidden folder password-protected?

No. Hiding only changes whether Finder displays the item. Use an encrypted disk image if you need a password.

Can another administrator on my Mac see my files?

An administrator can reset your login password and reach your files. Only encryption, such as a disk image or FileVault, protects against that.

What happens if I forget the disk image password?

The contents are unrecoverable. There is no reset option, so keep the password somewhere safe outside the Mac.

Does hiding a file remove it from search results?

Not always. Spotlight may still index hidden items, so add the folder to the Spotlight exclusion list as well.

Can I hide files on an iPhone the same way?

No. iOS has no Finder or Terminal. Use the Photos app's Hidden album, which can be locked with Face ID or Touch ID, or a password-protected notes app for other files.