How to Hide and Show Files/Folders on macOS – When working on a Macbook or iMac running macOS, you may have important or secret files and directories that you do not want others to access. Unfortunately, macOS does not have a built-in feature in its graphical user interface (GUI) to conceal and reveal hidden files and directories. However, you can use the command line and the Terminal application to do so.
Here’s how to conceal, access, and reveal files and directories on Mac OS:
-
Hide Files or Directories in Mac OS:
- Open the Terminal application.
- Create the file or directory that you want to hide.
- Name the file or directory.
- For example, here I have created and named a directory.
- Type the following command in the terminal: chflags hidden
- Drag the file or directory to the terminal window. The command will now look like this: chflags hidden (the address for the location of the file or directory you created).
- Press Enter. The file or directory is now hidden.
- You can verify this by checking the Finder.
-
View Hidden Files or Directories in Mac OS:
- To access hidden files or directories, open the Finder and select Go > Go to Folder.
- Alternatively, you can press Shift + Command + G on your keyboard.
- In the Go to folder section, copy and paste the address of the hidden directory file location.
- Click Go. The hidden directory will now appear, but it will be transparent.
-
To show a hidden file or folder:
- Open the Terminal application.
- Type the command: chflags nohidden
- Drag the file or folder that you want to show to the terminal window.
- Press Enter to reveal the file or folder. It should now be visible in the Finder.
Read also : How to Secure Files/Directories on macOS
Note: You can also use the Go to Folder feature in the Finder to access hidden files and folders. To do so, open the Finder and select Go > Go to Folder, or press Shift + Command + G on your keyboard. In the Go to folder section, copy and paste the address of the hidden file or folder location and click Go. The hidden file or folder will now appear, but it will be transparent.