Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tried to edit the file


but Windows always says that the file is in use.

share|improve this question
up vote 3 down vote accepted

It might be done by running notepad.exe as administrator. The way I do it is by copying the hosts-file into "Copy of hosts", and making the changes in that file. Then I delete the hosts-file (which it will allow for some reason), and rename the copied file to "hosts".

share|improve this answer
BRILLIANT, THIS WORKED!!! Thanks! :) – Zubair Jan 15 '11 at 16:26
@Zubair so accept this answer ;) – bluish Apr 20 '11 at 7:04
sorry, I hadnt been to super user for a while :) – Zubair Apr 24 '11 at 12:21

The easiest way is to run any text editor you use as an administrator and then open the file with it.

share|improve this answer

Open notepad as an administrator, right click on notepad.exe and select "run as administrator", then use File > Open, navigate to the hosts file.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.