Guides and Info Easy way to edit your hosts file

spud1966

Moderator
Staff member
Moderator
Joined
May 2, 2005
Messages
14,641
Reaction score
9,863
Location
The Moon
search cmd

right click open as admin

write

Code:
cd c:/windows/system32/drivers/etc

then write

Code:
notepad hosts

then put in your required edit

example

124.04.123 example.com

then just left click onto file and select save .......
 
You can also <run> cmd and in the command window type notepad.exe c:/windows/system32/drivers/etc/hosts add your edit and then close. All this is doing is telling notepad the path to the file you wish to edit. It can be used to edit any text file if you know the path to the file. I find it easier and more intuitive to use explorer to browse to the file and then open with notepad.
 
@ablokedownthepub, If you browse to the hosts file in Windows Explorer and then 'Open With > Notepad' you won't be able to save your changes as Notepad won't have opened with the Administrator privileges required to edit the 'hosts' file.
 
Back
Top