---
title: "mac系统如何显示和隐藏文件"
author: "ltl3884"
date: "2012-03-13T00:12:10Z"
tags: []
categories: ["操作系统"]
slug: "mac"
draft: false
lastmod: "2012-03-13T00:12:36Z"
id: 1451922
url: "https://ltl3884.iteye.com/blog/1451922"
---

苹果Mac OS X操作系统下，隐藏文件是否显示有很多种设置方法，最简单的要算在Mac终端输入命令。显示/隐藏Mac隐藏文件命令如下(注意其中的空格并且区分大小写)：
显示Mac隐藏文件的命令：defaults write com.apple.finder AppleShowAllFiles -bool true
隐藏Mac隐藏文件的命令：defaults write com.apple.finder AppleShowAllFiles -bool false

或者
显示Mac隐藏文件的命令：defaults write com.apple.finder AppleShowAllFiles  YES
隐藏Mac隐藏文件的命令：defaults write com.apple.finder AppleShowAllFiles  NO

输完单击Enter键，退出终端，重新启动Finder就可以了 (killall finder)