Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to redirect some sites to localhost. I can use hosts file which resides in directory C:\WINDOWS\system32\drivers\etc in windows.

Which is equivalent of this file in Ubuntu?

share|improve this question
Amusingly, the Windows hosts file is actually the equivalent of the Unix host file ; both files being kept in a folder called "etc" is a big clue. –  Adrian Jul 22 '12 at 7:09

1 Answer 1

up vote 4 down vote accepted

In Ubuntu it is /etc/hosts. You can edit the file as same in other OSes.

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.