Always Show File Extensions in Finder
One global preference makes every Finder window display extensions, so 'invoice' becomes 'invoice.pdf'.
01Command
$ defaults write NSGlobalDomain AppleShowAllExtensions -bool true && killall Finder02What it does
macOS hides extensions by default, which is why two files named 'report' look identical until one turns out to be report.pages and the other report.docx. The AppleShowAllExtensions key lives in NSGlobalDomain, the domain shared by every app, so one write covers all windows and new files. killall Finder is required because Finder caches preference values at launch — windows flash once and reappear. Per-file 'hide extension' flags still win for individual files.
03Risk
04Undo
$ defaults write NSGlobalDomain AppleShowAllExtensions -bool false && killall Finder05Sources
- defaults — read and write user defaults (macOS man page)Evidence: Documents defaults write with a domain and key, and NSGlobalDomain as the global preference domain.
Last verified: 2026-09-18 · Category: System & Settings
06Related solutions
Make Finder display .pdf, .docx, .png and every other extension at all times.
List the biggest files in your home folder that are eating disk space.
Permanently reveal ~/Library — where app settings, caches and support files live.