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?
|
| |||
|
feedback
|
|
Yes, you can1. No, you definitely should not. It won't break your OS X by itself, but... ...having system configuration files restricted from writing by non-admins is precisely how Unix systems have resisted most malware. On the other hand, in older versions of Windows you could often find popular sites redirected to a password-stealing site or a completely nonexistent server. 1 If you're going to do it, better just add yourself to the access list instead of changing ownership: | |||||||
feedback
|
|
If you're editing the hosts file that frequently, why not just create an alias? Add something like | ||||
|
feedback
|
emacs, Mac OS X should havevim(cue holy war)ed(of course) andnanoinstalled already, and many more can be acquired. Personally I findemacsfar too heavyweight for small changes to configuration files, and thus prefernano. – Scott Nov 29 '11 at 14:19nanoto 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 Dec 1 '11 at 18:46