3
1
It's a bit inconvenient to have to sudo emacs /etc/hosts
whenever I want to make a change to my hosts file, especially since I don't use a Terminal-based editor primarily. Could I change the ownership of my hosts file so that my user is the owner and thus the file could be edited in any text editor I open? Would that cause any problems for OS X?
What editor are you using instead? – Daniel Beck – 2011-11-28T21:47:18.223
2There are text editors such as TextWrangler that can automatically authenticate and edit the file with root privileges. – slhck – 2011-11-28T23:04:02.043
Have you tried other terminal-based text editors? As well as
emacs
, Mac OS X should havevim
(cue holy war)ed
(of course) andnano
installed already, and many more can be acquired. Personally I findemacs
far too heavyweight for small changes to configuration files, and thus prefernano
. – Scott – 2011-11-29T14:19:33.737I'm using ActiveState Komodo Edit. I wish it did what TextWrangler and Coda did with prompting for sudo privileges. I used to use
nano
to edit my hosts file, but recently have been usingemacs
. However, it's not the primary editor I use, so I'd rather have some consistency and just use Komodo. – Weston Ruter – 2011-12-01T18:46:51.110