14

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?

  • 4
    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
14

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

  • What for then there is a resolve.conf in Ubuntu? – Green Jul 12 '16 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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