打开终端命令行工具输入以下命令
对于OS X 10.9及以上版本:
defaults write com.apple.finder AppleShowAllFiles TRUE
10.9之前版本需把finder改为Finder:
defaults write com.apple.Finder AppleShowAllFiles TRUE
这时如果finder没生效,需要重启Finder:
killall Finder
defaults write com.apple.finder AppleShowAllFiles TRUE
defaults write com.apple.Finder AppleShowAllFiles TRUE
killall Finder