What hidden files are and why they're there
Hidden files are real files on your computer that the operating system keeps out of sight by default. They are not deleted or locked away — they straightforward have a setting that tells your computer not to display them in the folder view you see every day. Operating systems hide them because they contain settings and data that most people do not need to see, and accidentally moving or deleting them can break programs or your system itself.
Common hidden files include configuration files (the settings that programs use to remember your preferences), system files (files Windows or macOS needs to run), and backup files that programs create automatically. On Windows, files that start with a period or have the hidden attribute set are not shown. On Mac, files that start with a period are hidden. On Linux, the same rule applies — a period at the start of the filename hides it.
You might need to see hidden files if you are looking for a configuration file to edit, trying to find a backup copy of something, or troubleshooting why a program is not working the way you set it up. The process is different on each operating system, but the principle is the same: you are turning on a display setting, not unlocking anything.
Key Takeaways
- Hidden files are ordinary files with a setting that hides them from view; they are not encrypted or locked, just not displayed by default.
- On Windows, you turn on hidden files in the View tab of File Explorer; on Mac, you use a keyboard shortcut or a terminal command.
- Files that start with a period (like .gitignore or .bashrc) are hidden on Mac and Linux; on Windows, files have a hidden attribute you can toggle.
- Once you turn on the display of hidden files, they stay visible until you turn the setting off again — the setting applies to your whole computer, not just one folder.
Showing hidden files on Windows
Open File Explorer and navigate to any folder. At the top of the window, click the View tab. In the ribbon that appears, look for a checkbox labeled Hidden items (in Windows 11) or Show hidden files, folders, and drives (in Windows 10). Click the checkbox to turn it on.
Once you do this, any hidden files in the current folder and all subfolders will appear in the normal file list. They often look slightly faded or have a different icon to show they are hidden, but they are fully accessible. If you want to hide them again, uncheck the same box. The setting persists across sessions — if you close File Explorer and open it again, hidden files will still be visible until you turn the setting off.
If you cannot find the View tab, make sure you are in File Explorer (not a web browser or another program). On some systems, the View tab only appears when a folder is open; if you are looking at the home screen or a search result, the tab may not be there.
Showing hidden files on Mac
The fastest way is to use a keyboard shortcut. Press Command + Shift + Period (the period key, not the full stop on the number pad). Hidden files will appear when ready in the Finder window you are looking at. Press the same shortcut again to hide them.
If the keyboard shortcut does not work, you can use the terminal instead. Open Terminal (search for it in Spotlight by pressing Command + Space, typing "Terminal", and pressing Enter). Type this command exactly:
defaults write com.apple.finder AppleShowAllFiles true
Press Enter, then type this command:
killall Finder
Press Enter again. Finder will restart, and hidden files will now be visible everywhere. To hide them again later, repeat the process but replace true with false in the first command.
Showing hidden files on Linux
In most Linux file managers (like Nautilus on Ubuntu or Dolphin on Fedora), open the menu and look for Show Hidden Files or View Hidden Files. Click it to toggle hidden files on and off. The exact location depends on your file manager, but it is usually in the hamburger menu (three horizontal lines) or the View menu.
If you are using the terminal, hidden files are shown by default when you use the ls -a command (the -a flag means "all files, including hidden"). If you use ls without the flag, hidden files are not listed. You can also navigate into folders and edit hidden files directly from the terminal if you know their names.
Finding specific hidden files you are looking for
If you know the name of the file you are looking for, use your system's search function rather than scrolling through folders. On Windows, open File Explorer, type the filename in the search box at the top right, and search will find hidden files even if you have not turned on the display setting. On Mac, use Spotlight (Command + Space) and type the filename. On Linux, use your file manager's search function or the terminal command find ~ -name "filename".
Common hidden files you might be looking for include .ssh (contains security keys for remote access), .git (contains version control information for code projects), .config (contains settings for many programs), and .bashrc or .zshrc (contains terminal settings on Mac and Linux). If you are looking for a backup or temporary file, it might be in a hidden folder like .cache or .local.
What to do once you find a hidden file
Do not delete a hidden file unless you are certain what it does. If you are looking at a hidden file because a program is not working correctly, the file is usually a configuration or data file that the program needs. Deleting it will often force the program to recreate it with default settings, which may fix the problem — but it will also erase any customization you have done.
If you need to edit a hidden file (like a configuration file), open it with a text editor. Right-click the file, select Open with, and choose Notepad (Windows), TextEdit (Mac), or your preferred text editor. Make your changes carefully — configuration files are often sensitive to spacing and punctuation. Save the file with the same name and extension, and the program should read the new settings the next time it starts.
If you are unsure whether a hidden file is safe to touch, search for its name online along with the program that uses it. Most common hidden files have documentation explaining what they do and whether it is safe to delete them.
Frequently Asked Questions
Are hidden files dangerous or encrypted?
Hidden files are not encrypted or dangerous — they are just ordinary files with a display setting turned off. The operating system hides them to prevent accidental deletion, not to protect them from you. You can read, edit, or delete them the same way you would any other file, though you should be careful with system files.
Will turning on hidden files slow down my computer?
No. Showing hidden files is only a display setting — it does not change how your computer runs or how much storage you use. It straightforward makes files visible that were already there.
Can I hide a file I created myself?
Yes. On Windows, right-click the file, select Properties, check the Hidden checkbox, and click OK. On Mac and Linux, rename the file to start with a period (for example, change "notes.txt" to ".notes.txt"). The file will then be hidden until you show hidden files or rename it back.
What if I accidentally deleted a hidden file?
Try to recover it using your system's trash or recycle bin — deleted files usually go there first and can be restored. If the file is gone from the trash, you may be able to recover it with a file recovery tool, though success depends on how long ago it was deleted and how much the disk has been used since then.
Do I need to turn off hidden files when I am done looking?
You do not have to, but many people prefer to turn the setting back off to keep their folders less cluttered. The choice is yours — hidden files will not cause problems if they remain visible.