you’ll have to deal with OS warnings and prompts every time you want to edit it.
For which versions of Windows does this happen? I’m running Windows XP and I also use my hosts file to block time-wasting websites, but I don’t ever get any warnings when I edit my hosts file in Notepad. This makes the hosts file not so inconvenient, because all you have to do is (Windows key) + R > type in “cmd” and hit enter, and in command line type: “edit c:\windows\system32\drivers\etc\hosts” and you’re done.
This can be done in about 15 seconds, unfortunately, and having the line “#127.0.0.1 www.facebook.com″ in my current hosts file is a testament to that fact (“#” comments everything out after it on that line).
Uh, I guess that my advice won’t work for programmers and admins then. I’m using Windows 7 under a non-admin / restricted account with UAC set to its default setting, level 3, and I don’t use command-line to edit. I do it the normal way :) -- I double-click it, it asks me for an admin password, then to chose a program to open it, I chose Notepad, edit it, it won’t let me save, I save to Desktop, then close Notepad and copy the file over, it asks me to copy or replace etc. etc.
BTW I just tried “edit c:\windows\system32\drivers\etc\hosts” in Win7 under both admin and non-admin accounts (had to replace ‘edit’ with ‘notepad’). It indeed opened the file but it won’t let me save the edits afterwards—probably due to Windows File Protection.
I’m running Windows XP and I also use my hosts file to block time-wasting websites, but I don’t ever get any warnings when I edit my hosts file in Notepad. This makes the hosts file not so inconvenient, because all you have to do is (Windows key) + R > type in “cmd” and hit enter, and in command line type: “edit c:\windows\system32\drivers\etc\hosts” and you’re done.
I’ve actually got mine pinned on the taskbar. ;)
Useful for web development… I redirect to my linux VM.
For which versions of Windows does this happen? I’m running Windows XP and I also use my hosts file to block time-wasting websites, but I don’t ever get any warnings when I edit my hosts file in Notepad. This makes the hosts file not so inconvenient, because all you have to do is (Windows key) + R > type in “cmd” and hit enter, and in command line type: “edit c:\windows\system32\drivers\etc\hosts” and you’re done.
This can be done in about 15 seconds, unfortunately, and having the line “#127.0.0.1 www.facebook.com″ in my current hosts file is a testament to that fact (“#” comments everything out after it on that line).
Uh, I guess that my advice won’t work for programmers and admins then. I’m using Windows 7 under a non-admin / restricted account with UAC set to its default setting, level 3, and I don’t use command-line to edit. I do it the normal way :) -- I double-click it, it asks me for an admin password, then to chose a program to open it, I chose Notepad, edit it, it won’t let me save, I save to Desktop, then close Notepad and copy the file over, it asks me to copy or replace etc. etc.
BTW I just tried “edit c:\windows\system32\drivers\etc\hosts” in Win7 under both admin and non-admin accounts (had to replace ‘edit’ with ‘notepad’). It indeed opened the file but it won’t let me save the edits afterwards—probably due to Windows File Protection.
I’ve actually got mine pinned on the taskbar. ;)
Useful for web development… I redirect to my linux VM.