How to Open Hidden Files on Windows, Mac, and Linux
Hidden files exist on every operating system — and for good reason. Operating systems deliberately conceal system files, configuration folders, and certain application data to prevent accidental deletion or modification. But there are plenty of legitimate reasons to need access: troubleshooting software issues, recovering data, editing configuration files, or simply understanding what's taking up space on your drive.
Here's what you need to know about how hidden files work, how to reveal them, and what determines the right approach for your situation.
What Are Hidden Files and Why Are They Hidden?
Hidden files are files or folders that the operating system excludes from standard directory views. They're not encrypted or protected — they're just set to a "hidden" attribute that tells file explorers to skip displaying them by default.
Common examples include:
- System files — core OS components that shouldn't be manually edited
- Application configuration files — settings stored in folders like
.configorAppData - Dotfiles — files beginning with a
.on Unix-based systems (like.bashrcor.ssh) - Temporary and cache files — working files created by software during operation
Hiding these files reduces clutter and lowers the risk of a user accidentally breaking something critical. That said, developers, power users, and anyone doing system maintenance regularly need to see them.
How to Show Hidden Files on Windows 🪟
Windows uses a file attribute flag to mark files as hidden. The most straightforward way to reveal them is through File Explorer.
Using File Explorer (Windows 10 and 11):
- Open File Explorer
- Click the View menu at the top
- On Windows 10: check Hidden items in the Show/Hide group
- On Windows 11: go to View → Show → Hidden items
This toggles visibility for hidden files and folders across the current and all subdirectories.
Using Folder Options:
- Open File Explorer → View → Options (or search "Folder Options" in the Start menu)
- Go to the View tab
- Under Advanced Settings, select Show hidden files, folders, and drives
- Click Apply
Using Command Prompt:
To reveal a specific hidden file via command line:
attrib -h -s "C:path ofile" The -h flag removes the hidden attribute; -s removes the system attribute if set.
Note: Windows also has a separate layer called protected operating system files. These require an additional toggle — unchecking "Hide protected operating system files" in Folder Options — and come with a warning for good reason. These files are lower-level than typical hidden files.
How to Show Hidden Files on macOS
macOS hides files beginning with a . (dot) by convention, plus certain system directories like /Library.
Using Finder keyboard shortcut:
Press ⌘ + Shift + . (Command + Shift + Period) in any Finder window. This toggles hidden file visibility on and off immediately — no settings menu required.
Using Terminal:
To permanently show hidden files in Finder:
defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder Replace TRUE with FALSE to re-hide them. The killall Finder command restarts Finder to apply the change.
Accessing the Library folder specifically:
The ~/Library folder (user-level application data) is hidden by default. In Finder, hold Option and click the Go menu — Library will appear as an option.
How to Show Hidden Files on Linux
Linux and other Unix-based systems use the dot prefix convention: any file or folder starting with . is treated as hidden. There's no special attribute — the name itself determines visibility. 🐧
In a graphical file manager:
Most Linux file managers (Nautilus, Thunar, Dolphin) have a Show Hidden Files option, typically under the View menu or accessible with Ctrl + H.
In the terminal:
ls -a The -a flag includes all files, including dotfiles. Use -la for a detailed list with permissions, ownership, and sizes.
To make a file hidden, simply rename it with a leading dot:
mv filename .filename To unhide it, remove the dot.
Key Variables That Affect Your Approach
| Factor | What It Changes |
|---|---|
| Operating system | Commands, menus, and conventions differ significantly |
| OS version | Menu locations in Windows 10 vs 11, macOS versions, differ slightly |
| File manager vs terminal | GUI methods are faster; terminal offers more precision and scriptability |
| File type | System-protected files need additional steps beyond just "show hidden" |
| User permissions | Standard accounts may not be able to view or modify certain hidden system files |
| Purpose | Viewing vs editing vs permanently unhiding require different approaches |
A Note on System-Protected vs Simply Hidden Files
Not all hidden files are equal. There's a practical difference between:
- User-hidden files — dotfiles, config folders, app data. Generally safe to view and edit if you know what you're doing.
- System-protected files — OS components flagged with both hidden and system attributes. Viewing is usually fine; modifying without understanding the consequences carries real risk.
On all platforms, revealing hidden files doesn't grant permission to edit everything you can now see. File permissions still apply, and some system files require administrator or root-level access to modify — separate from simply making them visible.
What Determines the Right Method for You
The approach that makes sense depends on factors specific to your setup. Someone on Windows 11 casually looking for an app's config folder has a very different need than a developer on macOS managing dotfiles across multiple environments, or a Linux administrator scripting changes across a server.
Your OS version, whether you're comfortable with terminal commands, what you're actually trying to do with the files once visible, and whether you're working on a personal machine or a managed system — all of these shape which method fits, and how carefully you'll want to proceed once those files are in view.