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.

Rating: 1 out of 5.

Leave a Reply

Discover more from Winged Boar Tavern

Subscribe now to keep reading and get access to the full archive.

Continue reading