Run TextEdit As Root

Need to edit a file as root, make sure TextEdit isn’t running, then open the Terminal and:

sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit &
open -a "TextEdit" /etc/hosts

The first command (line) runs TextEdit as root; the second one tells it to open the file you want to edit. Make your changes and save. After you’re finished be sure to quit TextEdit or it will still keep editing files as root.

Tagged with: , , , , , , ,
Posted in Macintosh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Enter your email address to follow this site and receive notifications of new posts by email.

Join 196 other followers

Categories
Flickr Photos
Archives
Colophon
wordpress com stats plugin
%d bloggers like this: