How to Unhide a Hidden File on Windows, Mac, and Linux

Hidden files exist on every operating system — and for good reason. Operating systems use them to store configuration data, system preferences, and temporary files that most users never need to touch. But sometimes you do need to find them: recovering a missing document, troubleshooting an app, or accessing a dotfile to change a setting. Knowing how to unhide a hidden file — and understanding why files get hidden in the first place — is a genuinely useful skill.

Why Files Get Hidden

Files become hidden in a few different ways:

  • System-hidden by the OS — Windows, macOS, and Linux all hide certain files automatically to prevent accidental deletion or modification.
  • Manually hidden by a user — Someone may have hidden a file intentionally using file attribute settings or by naming it with a dot prefix (on Unix-based systems).
  • Hidden by an application — Some software hides its own config or cache files to keep directories tidy.

The method you use to unhide a file depends heavily on why it's hidden and which operating system you're working on.

How to Unhide Files on Windows 🪟

Windows uses a file attribute system to mark files as hidden. There are two main approaches:

Using File Explorer (No Command Line Required)

  1. Open File Explorer
  2. Click the View tab (Windows 10) or the View menu at the top (Windows 11)
  3. Check the box labeled Hidden items

This toggles visibility for all hidden files in the current folder. Files will appear slightly faded to indicate they're hidden but now visible.

To permanently remove the hidden attribute from a specific file:

  1. Right-click the file
  2. Select Properties
  3. Under the General tab, uncheck Hidden
  4. Click Apply

Using Command Prompt

For more control — especially with system files or batch operations — the command line is more precise:

attrib -h -s "C:path oyourfile.txt" 
  • -h removes the hidden attribute
  • -s removes the system attribute (needed for some protected files)

Note: Some files are hidden and protected by Windows as system files. Revealing these requires an additional step: in File Explorer's View options, uncheck Hide protected operating system files. Proceed with caution here — these files are hidden for a reason.

How to Unhide Files on macOS 🍎

macOS hides files using the Unix dotfile convention (filenames starting with .) and also via a hidden file flag in the filesystem.

Show All Hidden Files Temporarily

Use this keyboard shortcut inside any Finder window:

Command + Shift + Period ( . )

This toggles hidden file visibility on and off. Hidden files appear grayed out. Press it again to hide them.

Using Terminal

To reveal a specific hidden file or folder:

chflags nohidden ~/path/to/file 

For dotfiles (files starting with .), you don't need to remove the dot — just make them visible using the Finder toggle above, or move/rename them if you want them permanently visible.

To show all hidden files system-wide via Terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder 

Reverse this by switching TRUE to FALSE and running killall Finder again.

How to Unhide Files on Linux

Linux follows the dotfile convention: any file or folder whose name begins with a . is treated as hidden. There's no separate attribute — the name itself is the mechanism.

In a File Manager

Most Linux desktop environments (GNOME, KDE, etc.) let you toggle hidden file visibility with:

Ctrl + H

This shows or hides dotfiles in the current directory view.

In the Terminal

To list hidden files:

ls -a 

To make a hidden file visible permanently, rename it to remove the leading dot:

mv .hiddenfile visiblefile 

There's no "hidden attribute" to remove — visibility is purely a naming convention.

Comparing Methods Across Operating Systems

OSHidden File MechanismGUI ToggleCommand Line Method
WindowsFile attribute (-h flag)File Explorer → View → Hidden itemsattrib -h filename
macOSFilesystem flag + dotfilesCmd + Shift + . in Finderchflags nohidden filename
LinuxDotfile naming conventionCtrl + H in file managermv .filename filename

Variables That Affect the Process

Not every situation is the same. A few factors shape how straightforward (or complicated) unhiding a file will be:

  • OS version — File Explorer's layout in Windows 10 vs. Windows 11 differs enough to confuse users. macOS also reorganized Finder options across versions.
  • File type — System files, application config files, and user-created hidden files each have different implications for whether you should unhide them.
  • Permissions — On shared or managed systems (work computers, school networks), you may not have the admin rights needed to reveal system-protected files.
  • Why the file was hidden — A file hidden by an application may revert to hidden the next time that app runs, even if you manually unhide it.
  • Technical comfort level — The GUI methods work fine for most users. Terminal and command-line methods offer more control but require care, especially when dealing with system-level files.

When Unhiding Can Go Wrong

Revealing hidden files is generally safe — viewing them doesn't change them. The risk comes from accidentally modifying or deleting a file that the OS or an application depends on. This is especially true for Windows system files protected with both hidden and system attributes.

If you're unhiding files to troubleshoot an application or recover data, it's worth knowing exactly which file you're looking for before making changes. Revealing everything and then editing files at random is where problems can start.

Your specific setup — operating system, version, whether the device is personally managed or part of a network, and what exactly you're trying to access — determines which approach actually makes sense for your situation.