# How to Show Hidden Files on a Mac (Command-Shift-Period)

ComfortFiles is a Windows Explorer-style file manager for macOS.

The fastest way to show hidden files on a Mac is the keyboard shortcut: in Finder, press <kbd>⌘⇧.</kbd> (Command-Shift-Period). Hidden files and folders appear, dimmed; press it again to hide them. This works anywhere Finder shows files — including Open and Save dialogs.

## The shortcut: Command-Shift-Period (⌘⇧.)

1. Open a Finder window (or any Open/Save dialog).
2. Press <kbd>⌘⇧.</kbd> — hold Command and Shift, then tap the period key.
3. Dotfiles like `.gitignore`, `.env`, and folders like `.ssh` show up, greyed out.
4. Press <kbd>⌘⇧.</kbd> again to hide them.

This toggle has been built into Finder since macOS Sierra (2016). It's per-session and global — it flips the view everywhere, and it's the same key you'll use most of the time.

## Make it permanent with Terminal

If you want hidden files to stay visible without toggling, set it with a command:

```
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder
```

To hide them again, set it back to `false`:

```
defaults write com.apple.finder AppleShowAllFiles -bool false
killall Finder
```

`killall Finder` just restarts Finder so the change takes effect — your files are untouched.

## What counts as "hidden"

macOS hides two kinds of items:

- **Dotfiles** — anything whose name starts with a period (`.DS_Store`, `.gitconfig`, `.zshrc`).
- **Flagged items** — files and folders with the hidden flag set, most notably your **`~/Library`** folder.

To reach `~/Library` specifically without unhiding everything: in Finder, open the **Go** menu and hold <kbd>⌥</kbd> (Option) — **Library** appears in the list. Or unhide it for good with `chflags nohidden ~/Library`.

## A word of caution

Hidden files are hidden for a reason: most are configuration or system files, and renaming or deleting the wrong one can break an app or your setup. Showing them is safe; changing them is where care is needed.

## Doing it in ComfortFiles

[ComfortFiles](/) uses the exact same shortcut you already know: <kbd>⌘⇧.</kbd> toggles hidden files, and there's a **View → Show Hidden Files** menu item (with a checkmark) plus a **Show hidden files** switch in Settings. The choice persists across relaunches, so you can leave dotfiles visible for good if that's how you work. See [how it works in ComfortFiles](/how-to/show-hidden-files/).

<video class="howto-shot" autoplay muted loop playsinline poster="/media/how-to/show-hidden-files-poster.png" width="1130" height="790">
  <source src="/media/how-to/show-hidden-files.mp4" type="video/mp4" />
</video>
