Unable to edit hosts file because of administrator privileges or any other reasons? Here’s How to edit Windows hosts file.
You might not need to edit windows hosts file regularly because it is a system file and it needs not to be edited. However there are some instances where you might get a need to edit hosts file. Here in this tutorial I will be writing the steps using which you can edit Windows hosts file in windows vista, windows 7 as well as windows 8.
Steps to edit Windows hosts file
To edit hosts file in windows 7, windows 8 or windows vista, you need to follow the below steps
- Open My Computer.
- Open the hard disk drive partition where you have installed windows, Generally Windows is installed in C:// drive but if you have installed windows in some other drive, open that.
- Navigate to Windows >> System32 >> Drivers >> etc . You will see some 5-6 files with unknown extension. Check : How to open files having unknown extension
- Out of those 5-6 files, you will get a file named as hosts . Right click on that file and then click open and then select Notepad from the dialog box which appears.
- Click OK, you will get a notepad window. Edit this file in whichever manner you want and click save.
If you are not able to do any of the above, have a look at the below image which has screenshots for all the above steps.
70% times, it works perfectly. If you have home basic or home premium version of windows 7 or Windows 8 basic, you might get some error telling C:\Windows\System32\drivers\etc\hosts.txt You don’t have permission to save in this location. Contact the administrator to obtain permission. Would you like to save in My Documents folder instead ?
This condition becomes pretty hectic, in case you are logged in with an administrator account with all the privileges and you are using the only user account on your computer. In that case, it becomes irritating and you might not think of a way to overcome this problem. Well, below are some steps which will tell you how to edit windows hosts file without administrator privileges.
How to Edit Files That Require Administrator Privileges
- Click on start menu, search Notepad.
- Right Click on Notepad option you see in the search menu and click on Run as Administrator.
- As you get Notepad window, click on File >> Open and browse to My Computer >> C:\ >> Windows >> System32 >> drivers >> etc .
- You might not see any file there to open, It’s because the default search file type is .txt and all the files in that folder are of different format. Select All files in file type option present in right bottom of open dialog box.
- As soon as you select All files in that option, you will see those 5-6 files which are there in this folder. Select hosts and click OK.
- Add whatever contents you want and then click on Save.
That is it. You have successfully edited hosts file which requires admin privileges. Below is an image showing all the above steps in a graphical manner.
That is it for this tutorial. Do let me know if you have any issues. Also, if it worked, do not forget to leave a Thank You note in the comments section.
Incoming Search Terms :
How to edit hosts file in windows 7
Edit windows 7 hosts file
Hosts file showing administrator privileges error
how to run hosts file as administrator