Ubuntu – equivalent of windows’ hosts file

internet connectionredirect

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?

Best Answer

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