Welcome to this short tutorial on edit the hosts file in notepad as administrator. So that you can edit and save the file and if you are like me who will need to do this, again and again, every day it’s really pretty disturbing to open the notepad first as administrator then using the menu open the host file edit and save it so it’s pretty disturbing. We’ll try to create a shortcut for that so to create a shortcut where you want to create the shortcut right click on for example I am treating the shortcut on my.I’ll go to kneel then shortcut here. I will write “notepad%SYSTEMROOT%\system32\drivers\etc\hosts” this is where your host’s file leave so next and give it a name. Example we are giving test finish oh I have a file with the name test to give us other tests to finish.So now if I click I see my host file is opened but the problem is that it’s not opening as administrator. To do it I will right click and select properties then I will go to the advanced button under the shortcut tab and select run as administrator and that’s it apply ok. Now when you double click the shortcut icon it will first ask you for confirmation to run it as administrator the new tool run the host file.You can do some changes, for example, I chanced to save it and it is saved. The next time if I open it you see the change is saved so that’s it it’s pretty cool quite easy just take a look once again it’s just for one let me write you control okay. it’s pretty simple note that space person test person just system root backslash system32 slash drivers etC post actually this is the location of the this-this is the location of the host file and this is the application that will run when you double take the shortcut. So this is the targeted application and this is the targeted file that will be opened with the application.
This is it a very short tutorial. I hope this will help guys like me who’s who works in the virtual host in their computer when developing web applications. So thank you.