Run TextEdit As Root

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

sudo /Applications/ &
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: Logo

You are commenting using your 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

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

Join 197 other subscribers
wordpress com stats plugin
%d bloggers like this: