SEARCH

How-To Geek

How to Hide Files and Folders on Every Operating System

files-and-folders-in-filing-cabinet

A hidden file or folder is just a normal file or folder with a “hidden” option set. Operating systems hide these files by default, so you can use this trick to hide some files if you share a computer with someone else.

This trick is far from foolproof. It’s trivial to enable the “show hidden files” option and find a hidden file. Operating systems hide many system files by default — just to get them out of your way.

Hide a File or Folder on Windows

To hide a file or folder on Windows, open a Windows Explorer or File Explorer window and locate the file or folder you want to hide. Right-click it and select Properties.

open-properties-window-to-hide-file-on-windows-8.1[4]

Enable the Hidden checkbox on the General pane of the Properties window. Click OK or Apply and your file or folder will be hidden.

hide-file-or-folder-on-windows

RELATED ARTICLE
Make a Super Hidden Folder in Windows Without any Extra Software
Almost anyone knows how to make a “hidden” folder in Windows, but then again almost anyone knows how to make... [Read Article]

Windows also has a second type of hidden file or folder, known as a “system file.” There’s a separate option to enable viewing system files and folders. You can make an extra-hidden file by marking it as a system file — people will have to go out of their way to disable the “Hide protected operating system files (recommended)” option to find it. You can’t do this from the graphical interface, so follow our guide to marking files and folders as system files on Windows if you want to do this.

View Hidden Files and Folders on Windows

RELATED ARTICLE
Show Hidden Files and Folders in Windows 7, 8.x or Vista
Windows 7, 8, and Vista hide important files and folders from view to keep users from deleting or otherwise modifying files they... [Read Article]

To view a hidden file or folder on Windows 8, click the View tab on the ribbon at the top of the File Explorer window and enable the Hidden items checkbox under Show/hide. Hidden files and folders will have partially transparent icons, so you can easily tell which are hidden and which are normally visible.

view-hidden-files-on-windows-8-and-8.1

On Windows 7, click the Organize button on the toolbar and select Folder and search options.

open-folder-options-dialog-on-windows-7

Click over to the View tab and select the Show hidden files, folders, and drives option. Click OK or Apply to save your changes.

show-hidden-files-and-folders-on-windows-7

Hide a File or Folder on Linux

Linux hides files and folders that have a period at the start of their name. To hide a file or folder, just rename it and place a period at the start of its name. For example, let’s say you had a folder named Secrets you wanted to hide. You’d rename it to .Secrets, with the period in front. File managers and other utilities will hide it from view by default.

hide-a-folder-or-file-on-ubuntu-linux

View Hidden Files and Folders on Linux

RELATED ARTICLE
7 Ubuntu File Manager Features You May Not Have Noticed
The Nautilus file manager included with Ubuntu includes some useful features you may not notice unless you go looking for... [Read Article]

Click the “Show hidden” option in your file manager of choice to view hidden files and folders on Linux. For example, in the Nautilus file manager used on Ubuntu and other GNOME-based Linux distributions, click the View menu and select Show Hidden Files.

show-hidden-files-on-ubuntu-linux

The option will just display files an folders with a period at the start of their name.

hidden-folders-and-files-on-nautilus-in-ubuntu-linux

You can view hidden files in an Open or Save dialog, too. On Ubuntu and other GNOME-based Linux distributions, just right-click in the list of files and select the Show Hidden Files option.

show-hidden-files-in-ubuntu-gtk-save-dialog

Hide a File or Folder on Mac OS X

RELATED ARTICLE
A Windows User’s Guide to Mac OS X Keyboard Shortcuts
Keyboard shortcuts are essential for being productive on any device with a keyboard, whether it’s a Windows PC or a... [Read Article]

Macs also hide files and folders beginning with a . character. There’s also a special “hidden” attribute the Finder will obey. Hiding a file or folder is a bit more difficult on a Mac. Try to rename a file or folder so it begins with a period and the Finder will tell you “these named are reserved for the system.” There’s also no way to quickly toggle the hidden attribute in the Finder’s graphical interface.

You can quickly mark a file or folder as hidden with the chflags command in the terminal. First, open a Terminal window by pressing Command + Space, typing Terminal into the Spotlight search dialog, and pressing Enter.

Type the following command into the terminal, but don’t press Enter:

chflags hidden

Be sure to type a space after “hidden.”

chflags-hidden-command-on-mac-os-x

Next, locate the file or folder you want to hide in the Finder. Drag and drop it to the terminal. The file or folder’s exact path will appear in the terminal.

Press Enter to run the command. This will mark the file as hidden.

hide-a-file-on-mac-os-x-10.9-mavericks

Use the same command to unhide a file or folder in the future, using “chflags nohidden” instead of “chflags hidden”/

View Hidden Files and Folders on Mac OS X

Mac OS X has a secret keyboard shortcut to view hidden folders and files in any program’s Open or Save dialog. Just press Command + Shift + Period. Note that this only works in Open and Save dialogs — not in the Finder itself. However, this may be the most convenient way to quickly access your hidden files when you need them.

view-hidden-files-and-folders-with-keyboard-shortcut-on-a-mac

The Finder doesn’t have a graphical option for viewing hidden files and folders. Instead, you’ll have to use a command. First, open a Terminal window in the same way as above. Run the following commands on Mac OS X 10.9 Mavericks. These commands will set the Finder to always show hidden files and restart the finder so your changes will take effect. Type each command into the terminal and press Enter after each.

defaults write com.apple.finder AppleShowAllFiles TRUE

killall Finder

(On older versions of Mac OS X prior to Mavericks — 10.8 Mountain Lion. 10.7 Lion, and 10.6 Snow Leopard — use the same commands as above but change “com.apple.finder” to “com.apple.Finder” — the F here must be capitalized on these operating systems.)

view-hidden-files-and-folders-in-mavericks

The Finder will show hidden files. They’ll be partially transparent so you can see which files are hidden and which are normally visible.

hidden-files-and-folders-in-finder-on-mavericks

To hide files again, run the following commands in a terminal window:

defaults write com.apple.finder AppleShowAllFiles FALSE

killall Finder

(On older versions of Mac OS X, remember to use “com.apple.Finder” instead).

disable-showing-hidden-files-and-folders-in-finder


To actually prevent people from accessing your secret files and folders, you’ll want to encrypt them instead. Files and folders hidden in the above ways are accessible with a few clicks — they’re hidden from view, but easy to find if someone goes looking for them. Encryption ensures your files and folders can’t be accessed unless someone has your encryption key.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 08/16/14