How To Hide/unhide Files and Folders on macOS?

Hiding files and folders on macOS is not a proper security replacement However it is a security measures which must be taken by every macOS users. For instance to protect your online accounts, always a strong password is recommended since it is hard to decrypt. Also, it is never a good idea to use your birthday date, names or someone special in your password because anyone can guess it. Similar to that, hiding files and folders in macOS is a bit hard for a basic user However if you think smartly, even the average macOS user will not be able to see your hidden files (You will find out by reading to the end). Anyway, let’s start the process of How To Hide/unhide Files and Folders on macOS.

How to hide files and folders on macOS using Terminal?

Launch the terminal in any way that seems fit to you but I’ll be using a spotlight.

Execute the below command in the terminal and make sure to replace the path with the directory or the file name. The easiest method is to simply drag the file or the folder into the terminal, this will automatically mention the file path in the terminal.

chflags hidden path
Note: If using the mentioned command, the file is not hidden, you can use this command: chflags hidden ~/path

Hide Files and Folders on macOS using GUI

  1. Navigate to the file or folder that you want to hide.
  2. Following that right click on the file or folder then choose Get Info.
  3. Go to the General Tab.
  4. Check the box next to hidden in the Attributes section.
  5. Go ahead and close the Get Info window.

How to unhide files and folders on macOS using Terminal? (Temporarily)

There is actually a very simple shortcut that you can use to unhide files and folders on MacOS and the shortcut is Command + shift + .

How To Hide/unhide Files and Folders on macOS?
shortcut to unhide files and folders in mac

You’ll have to execute the below command to unhide files and founders with terminal.

defaults write AppleShowAllFiles YES

Also, if you wish to hide the those items again, you can easily execute the below command.

defaults write AppleShowAllFiles NO

How to Permanently unhide Files and Folders on macOS?

  1. First, you have to view the hidden files temporarily by pressing the shortcut keyboard (Command + shift + .) or using terminal.
  2. Next you will have to launch the terminal and execute this command (chflags nohidden path)

You can drag the file or folder into the terminal and the path will be mentioned.

chflags nohidden path


  1. Change Keyboard Shortucut: Hiding Files and folders in your macOS with this technique is not a full proof protection. Even if you have hidden all of your important files, just by pressing the keyboard shortcut of (command + shift + .) , the hidden files will appear. However if you think smartly you can change the keyboard shortcut to something else so that only you know. Next time if anyone presses that (Command + shift + .), it will open something else.
  2. Use third-party apps: Using third party applications is one of the techniques which is likely better than terminal to secure your hidden files. For instance onyx from the titanium software, do a pretty solid job. Other apps such as Concealer, secret folder are also a good choice.

Also Read:

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button

Adblock Detected

Please consider supporting us by disabling your ad blocker!