Handy tip when editing the hosts file
A handy little tip for anyone who has to edit the hosts file on Windows. If like me you get bored of firing up Notepad (or equivalent) and then having to browse to open up the hosts file, then you can simply create a shortcut to it, which automatically opens up the hosts file in Notepad. To do it:
- Create a shortcut file (right click, new -> shortcut)
- In the "location" browser box type in:
"C:\WINDOWS\Notepad.exe" "c:\windows\system32\drivers\etc\hosts" - Click next
- Type in whatever you like for your shortcut name
- Click finish
Now when you click on your new shortcut, it will open up the hosts file in notepad without you having to do any of that tedious browsing.
P.S. If you are still using Notepad, then I suggest you have a look at Notepad++ as a really good replacement.
- Posted in:
- Apache


Comment by Bradley Moore – January 20, 2009
notepad "c:\windows\system32\drivers\etc\hosts"
will work just fine. See, I told you it was a niggle. :-)
Great tip, though. I've kept a shortcut on my desktop for years doing it just as you suggest. It's damn handy.
Comment by Rob Wilkerson – January 20, 2009
@Rob, That is picky! I left it with the full path in to make it obvious for people who wanted to change it their editor of choice :)
Comment by John Whish – January 21, 2009
Comment by Julian Halliwell – January 22, 2009