How to view hidden files on a Mac: Finder shortcut, Terminal and Library

Press Shift-Command-Period in a Finder window to show hidden files on a Mac, and again to hide them. Hold Option in the Go menu to open Library.

Read time
11 min
Word count
1.7K
Sections
10
FAQs
8
Share
Man in glasses at a library desk looking at Finder folders on a MacBook, with binders, a coffee mug and a notebook nearby
On this page · 10 sections
  1. Four ways to show hidden files on a Mac at a glance
  2. Method 1: Shift-Command-Period in Finder
  3. Method 2: show hidden files with a Terminal command
  4. Method 3: go straight to a hidden folder
  5. How to open the Library folder on a Mac
  6. What you will see, and what to leave alone
  7. Hidden files still not showing? Quick fixes
  8. For IT teams: hidden files on managed Macs
  9. How eCorpIT can help
  10. References

Summary. To view hidden files on a Mac, open a Finder window and press Shift-Command-Period (.), then press it again to hide them. Apple's keyboard shortcuts list does not include that shortcut, so if it does nothing, use the methods Apple documents. To keep hidden files visible, set Finder's AppleShowAllFiles preference to TRUE with one Terminal command and restart Finder. To open a single hidden folder without changing anything, choose Go > Go to Folder (Shift-Command-G) and type its path. For your Library folder, hold Option with the Go menu open and choose Library, or select Show Library Folder in your home folder's view options. Most hidden items are files and folders whose names start with a dot, plus system folders Finder keeps out of sight. The steps apply to macOS 27 Golden Gate, at version 27.2.1 (released 9 November 2026) when we checked. Look and copy freely, but delete only what you understand and have backed up.

About this article. For Mac users who need dot files or the Library folder, and for the IT teams that support them. We checked every step, menu path and shortcut on 15 November 2026 against Apple's Mac User Guide and Terminal User Guide for macOS 27, Apple Support articles, Apple's developer documentation and the OpenSSH and Git manuals. Menus can change in later updates, and no vendor paid for inclusion. Researched with AI assistance and reviewed by our editorial team.

Four ways to show hidden files on a Mac at a glance

Method What you do How long it lasts Best for
Finder shortcut Press Shift-Command-Period in a Finder window Until you press it again A quick look
Terminal setting Set AppleShowAllFiles to TRUE, then restart Finder Until you set it back to FALSE Developers who always want dot files
Go to Folder Press Shift-Command-G and type a path such as ~/Library One folder, one visit A hidden folder you already know
Library from the Go menu Hold Option with the Go menu open, choose Library One visit, or always with Show Library Folder App settings and support files

Sources for the table: Apple's shortcuts article, developer documentation and Mac User Guide.

Method 1: Shift-Command-Period in Finder

  1. Click the Finder icon in the Dock so a Finder window is in front.
  1. Open the folder you want to inspect, for example your home folder (Shift-Command-H).
  1. Press Shift-Command-Period (.), often written Command-Shift-Period. Hidden files and folders appear.
  1. Press the same keys again to hide them.

Apple's Mac keyboard shortcuts article (published 14 September 2026) does not list this shortcut, and the macOS 27 Mac User Guide points there for more shortcuts, so treat it as widely shared but undocumented. Shortcuts can also vary with language and keyboard layout. On a keyboard made for Windows PCs, press Ctrl or the Windows logo key where a shortcut uses Command. If nothing happens, click inside the Finder window and try again, then use Method 2 or 3.

Method 2: show hidden files with a Terminal command

Finder's own settings have no hidden-files option. Apple's developer documentation says Finder hides folders most users never need and files whose names begin with a dot, and that the defaults tool can override this with the AppleShowAllFiles preference. That guide dates from 2012. The commands below use com.apple.finder, the domain name in Apple's device management documentation, and the -bool flag described in the defaults manual page on your Mac (man defaults).

  1. Open Terminal: click the Spotlight icon in the menu bar, type Terminal and click it, or open the Utilities folder inside Applications (Shift-Command-U jumps there).
  1. Paste these lines, pressing Return after each:

            defaults write com.apple.finder AppleShowAllFiles -bool TRUE
killall Finder
          
  1. Finder quits and reopens, and every Finder window now shows hidden items.

To go back to the default, run:


            defaults write com.apple.finder AppleShowAllFiles -bool FALSE
killall Finder
          

The killall Finder line only restarts Finder so it reads the new setting; it deletes nothing. Apple's documented alternatives are to log out and back in, or to choose Force Quit from the Apple menu, select Finder and click Relaunch. Our guide to quitting apps on a Mac covers that window. Type the preference name exactly as shown.

List hidden files without changing Finder

A new Terminal window starts in your home folder, which the prompt shows as a tilde (~). The ls command with the -a flag lists every item, dot files included:


            ls -a ~
          

To open a hidden folder in Finder without changing any setting, use the open command, for example open ~/Library.

Method 3: go straight to a hidden folder

You do not have to show hidden files to open a hidden folder. The macOS 27 Mac User Guide describes Go to Folder:

  1. In Finder, choose Go > Go to Folder, or press Shift-Command-G.
  1. Start typing the path, for example ~/Library/Application Support/ or /usr/bin/. Matching folders appear as you type.
  1. Press Tab to accept a suggestion, then double-click the folder you want. If you pasted a full path, press Return.

A slash at the start means the top level of your Mac, a slash at the end marks a folder, and a tilde means your home folder. If a tilde is awkward on your keyboard layout, type the full path, such as /Users/yourname/Library, with your account's short name. Apple's guides for macOS Tahoe 26 and Sequoia 15 give the same steps.

How to open the Library folder on a Mac

Your user Library folder (~/Library) holds files apps use for your account, such as settings, caches and support files. Apple has hidden it since macOS 10.7 to keep the Finder simple and says to keep your own files in Documents instead. Apple documents three ways in:

  • Option key and the Go menu: click the desktop so Finder is active, open the Go menu, press and hold Option, then choose Library.
  • Go to Folder: press Shift-Command-G, type ~/Library and open the folder.
  • Always show it: choose Go > Home, then View > Show View Options, and select Show Library Folder.

There are three Library folders. ~/Library is yours alone, /Library holds items shared by every account, and /System/Library holds parts of macOS that users cannot change. Most troubleshooting steps mean ~/Library.

Before changing anything in Library, quit the app it belongs to and check your backup. Time Machine keeps hourly backups for the past 24 hours, daily backups for the past month and weekly backups for older months, deleting the oldest when the disk is full. To free space safely, see our guide to deleting temp files on a laptop.

What you will see, and what to leave alone

  • .DS_Store: files Finder writes into folders. Apple's network-share guidance shows that Finder reads them when deciding how to sort and display a folder's contents.
  • .zprofile and .zshrc: settings for zsh, the default shell since macOS 10.15. The first runs at login, the second for each new Terminal session. Edit with care.
  • .ssh: the default folder for your SSH settings and keys, including private keys only you should be able to read. Never share or delete them.
  • .git: the folder in a code project that holds its Git repository and history. Deleting it removes that history.

Hidden files still not showing? Quick fixes

  • The shortcut does nothing: make Finder the active app, then use the Terminal setting or Go to Folder.
  • The Terminal command changed nothing: restart Finder with Relaunch in the Force Quit window or with the killall Finder command, or log out and back in.
  • Go to Folder or Terminal is unavailable on a work Mac: Apple's device management settings for Finder let an organisation turn Go to Folder off, and IT may restrict Terminal too. Ask your IT team rather than looking for a way round it.

For IT teams: hidden files on managed Macs

  • .DS_Store on network shares: Apple's article for administrators says you can stop macOS reading .DS_Store files on SMB shares to speed up browsing with defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE, then log out and back in. FALSE turns sorting back on.
  • Decide once, then deploy: Apple's Finder payload can disable Go to Folder, Connect to Server and Eject, but has no key for hidden files. Intune can push a property list for an app's preference domain, but Microsoft notes that only some apps honour managed preferences, so test on a pilot Mac. Our Intune vs Jamf vs Kandji (Iru) comparison covers the main platforms.
  • Security: ~/Library/LaunchAgents holds third-party agents for the logged-in user, while /Library/LaunchAgents and /Library/LaunchDaemons hold third-party items for every user and the system. Endpoint tools should watch these locations, and help desk scripts should never tell users to empty Library folders wholesale.

How eCorpIT can help

eCorpIT is a Gurugram-based technology organisation, founded in 2021, assessed at CMMI Level 5 and MSME certified, with senior-led engineering teams working across AWS, Microsoft and Google platforms. Our digital transformation services team helps organisations set consistent Finder, Terminal and security settings across Mac and Windows fleets. Talk to us at /contact-us/.

Last updated: 15 November 2026.

References

  1. Mac keyboard shortcuts, published 14 September 2026 — Apple Support
  1. Porting UNIX/Linux Applications to OS X: Additional Features (archived, updated 11 June 2012) — Apple Developer
  1. Go directly to a specific folder on Mac (Mac User Guide, macOS 27 Golden Gate) — Apple Support
  1. Library folder (Mac User Guide glossary, macOS 27 Golden Gate) — Apple Support
  1. File System Programming Guide: File System Basics (archived, updated 9 April 2018) — Apple Developer
  1. Apple security releases, updated 13 November 2026 — Apple Support
  1. Use macOS keyboard shortcuts (Mac User Guide, macOS 27 Golden Gate) — Apple Support
  1. Change Finder settings on Mac (Mac User Guide, macOS 27 Golden Gate) — Apple Support
  1. Finder (Device Management payload) — Apple Developer
  1. Open or quit Terminal on Mac (Terminal User Guide 2.15, macOS 27) — Apple Support
  1. How to force an app to quit on Mac — Apple Support
  1. Command Line Primer, Shell Scripting Primer (archived, updated 10 March 2014) — Apple Developer
  1. Specify files and folders in Terminal on Mac (Terminal User Guide 2.15) — Apple Support
  1. Go directly to a specific folder on Mac (Mac User Guide, macOS Tahoe 26) — Apple Support
  1. Go directly to a specific folder on Mac (Mac User Guide, macOS Sequoia 15) — Apple Support
  1. Script management with launchd in Terminal on Mac (Terminal User Guide) — Apple Support
  1. Back up your Mac with Time Machine, published 16 October 2026 — Apple Support
  1. Adjust SMB browsing behavior in macOS, published 29 February 2024 — Apple Support
  1. Use zsh as the default shell on Mac, published 15 June 2026 — Apple Support
  1. ssh(1) manual page — OpenBSD (OpenSSH)
  1. gitrepository-layout documentation — Git
  1. Add a property list file to macOS devices using Microsoft Intune, updated 14 April 2026 — Microsoft Learn

Frequently asked

Quick answers.

01 What is the shortcut to show hidden files on a Mac?
Press Shift-Command-Period, also written Command-Shift-Period, in an active Finder window, and press it again to hide the items. Apple's published shortcuts list does not include it, so if it does nothing, use the AppleShowAllFiles setting in Terminal or open the folder with Go to Folder.
02 How do I permanently show hidden files on a Mac?
Open Terminal and run defaults write com.apple.finder AppleShowAllFiles -bool TRUE, then killall Finder so that Finder restarts and reads the setting. Hidden items stay visible in every Finder window until you run the command again with FALSE. No files are moved, changed or deleted.
03 How do I open the Library folder on a Mac?
In Finder, open the Go menu, hold the Option key and choose Library, or press Shift-Command-G and type ~/Library. To keep it visible, open your home folder, choose View, then Show View Options, and select Show Library Folder. Other hidden files stay hidden either way.
04 Why does a Mac hide some files?
Apple's developer documentation says Finder hides files and folders most people never need, including any name that starts with a dot and the user Library folder, to keep the interface simple. They hold app settings, caches, shell configuration and Finder metadata rather than your documents.
05 Is it safe to delete hidden files on a Mac?
Some are harmless to remove and some are not. Deleting SSH keys, a project's .git folder or Library files can lose data or stop apps working. Quit the related app, make sure your backup is current, and delete only files whose purpose you understand.
06 How do I see hidden files in Terminal on a Mac?
Open Terminal from Spotlight or the Utilities folder inside Applications, then run ls -a ~ to list every item in your home folder, including names that start with a dot. To open a hidden folder in Finder from Terminal, run open with the path, for example open ~/Library.
07 How do I hide the files again?
If you used the shortcut, press Shift-Command-Period again. If you used Terminal, run the same defaults command with FALSE, then killall Finder. If you turned on Show Library Folder, clear that checkbox in your home folder's view options. Go to Folder changes no setting, so needs no undoing.
08 Why can't I use Go to Folder on my work Mac?
Apple's device management settings for Finder include an option that disables Go to Folder, so your organisation may have turned it off on purpose, and it may block Terminal too. Ask your IT team for the access you need rather than working around the restriction.

About the author

Manu Shukla

Founder & Director

Founder of eCorpIT. Hands-on engineer leading senior-only delivery for AI apps, custom software, and cloud systems for global clients.

Subscribe

One engineering note a week. No fluff, no spam.

Senior-architect playbooks on AI agents, mobile apps, cloud, security, data, and marketing — delivered every Wednesday.

Past the reading

Read enough. Let's build something.

A senior architect responds in 24 working hours with scope, indicative cost, and a timeline. NDA before any technical conversation.

Loading search…

Browse all guides