How to Open Hidden Files on Windows, Mac, and Linux

Hidden files exist on every operating system — and for good reason. Your OS tucks away system files, configuration data, and application caches by default to prevent accidental deletion or modification. But there are plenty of legitimate reasons you might need to see them: troubleshooting software, recovering data, customizing your setup, or simply understanding what's living on your drive.

Here's how to reveal hidden files across the major platforms, plus what actually determines which method works for your situation.

What Are Hidden Files and Why Are They Hidden?

A hidden file is any file or folder flagged by the operating system to be invisible in standard directory views. On Windows, this is controlled by a file attribute literally called "Hidden." On macOS and Linux, any file or folder whose name begins with a dot (.) is treated as hidden by convention — think .bash_profile, .ssh, or .config.

These files aren't locked or encrypted. They're simply not shown by default. The hiding is a usability decision, not a security measure.

Common hidden files you might need to access include:

  • Application config files (.env, .gitconfig, .zshrc)
  • System folders (AppData on Windows, Library on macOS)
  • Temporary and cache files
  • Dotfiles used to configure developer tools

How to Show Hidden Files on Windows 🪟

Windows gives you a few ways to toggle hidden file visibility, depending on which version you're running.

File Explorer (Windows 10 and 11)

  1. Open File Explorer
  2. Click the View tab in the ribbon (Windows 10) or the View menu (Windows 11)
  3. Check Hidden items

That's it. Hidden files and folders will appear slightly faded to distinguish them from regular files.

Folder Options (Alternative Method)

  1. Open File Explorer
  2. Click View → Options → Change folder and search options
  3. Go to the View tab
  4. Under Advanced settings, select Show hidden files, folders, and drives
  5. Click Apply

Via the Command Prompt

To reveal a specific hidden file using the command line:

attrib -h -s "C:path ofile" 

This removes both the Hidden (-h) and System (-s) attributes from a file, making it permanently visible rather than just toggling the global view setting.

How to Show Hidden Files on macOS 🍎

macOS hides its Library folder and all dotfiles by default. There are two quick methods.

Keyboard Shortcut in Finder

In any Finder window, press:

Command + Shift + . (period) 

This toggles hidden files on and off instantly. It works in Open/Save dialogs too, which is useful when a piece of software asks you to locate a config file buried in a hidden directory.

Terminal Command (Permanent Toggle)

To make hidden files always visible in Finder:

defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder 

To hide them again, replace TRUE with FALSE. The killall Finder command restarts Finder so the change takes effect immediately.

Accessing the Library Folder Specifically

If you only need macOS's ~/Library folder:

  1. Open Finder
  2. Hold Option and click the Go menu
  3. Library appears as an option when Option is held

How to Show Hidden Files on Linux

Linux follows the dotfile convention strictly — any file or directory starting with . is hidden. Most file managers have a simple toggle.

In a GUI File Manager

  • GNOME Files (Nautilus): Press Ctrl + H
  • Thunar (Xfce): Press Ctrl + H or go to View → Show Hidden Files
  • Dolphin (KDE): Press Alt + . or go to View → Show Hidden Files

In the Terminal

The standard ls command won't show hidden files unless you add a flag:

ls -a # shows all files including hidden ls -la # shows all files with detailed info (permissions, size, date) 

The -a flag means "all" — it includes entries starting with a dot.

Key Variables That Affect Your Approach

Not everyone's situation is the same, and a few factors determine which method actually works for you:

VariableWhy It Matters
Operating system versionOlder Windows versions use a different ribbon UI; macOS Sequoia vs. Ventura may have slightly different Finder menus
File manager softwareThird-party file managers (Total Commander, Midnight Commander, FreeCommander) have their own hidden file toggles
User permissionsSome hidden system files require administrator or root access even after making them visible
File typeOn Windows, "Protected operating system files" are a separate category from regular hidden files and require an additional setting to reveal
Developer toolsIDEs like VS Code show dotfiles in their sidebar by default; terminal-based editors follow the same ls -a logic

The Protected System Files Distinction (Windows-Specific)

On Windows, there's a distinction worth knowing: hidden files and protected operating system files are controlled separately. To reveal protected system files:

  1. Open Folder Options → View
  2. Uncheck Hide protected operating system files (Recommended)

You'll get a warning before the system lets you proceed — which reflects how consequential those files can be. Deleting or modifying them can break system functionality.

What "Visible" Doesn't Mean

Making hidden files visible doesn't grant you permission to edit or delete everything you can now see. System files often require elevated permissions to modify. On Windows, that means running as Administrator. On macOS and Linux, that typically means using sudo in the terminal.

Visibility also doesn't mean safety. Some of those files — especially system-level configuration files — are hidden precisely because accidental changes cause real problems. Seeing them and knowing what to do with them are two different things, and the right level of caution depends heavily on what you're trying to accomplish and how familiar you are with the files involved.

Whether you're a developer managing dotfiles, a power user recovering data, or someone troubleshooting an application, the method that makes sense — and the depth to which you should explore once files are visible — comes down to your specific setup and goals.