---
title: "Mac OS用终端打开 TextEdit 的指令"
author: "Pweb"
date: "2010-11-10T10:00:30Z"
tags: []
categories: ["操作系统"]
slug: "mac-os-textedit"
draft: false
lastmod: "2011-06-21T11:01:09Z"
id: 807285
url: "https://pwb.iteye.com/blog/807285"
---

打开终端，输入:sudo open -a TextEdit.app /编辑文件路径

 

如编辑hosts文件:

 

```
sudo open -a TextEdit.app /private/etc/hosts
```