What is equivalent of windows' hosts file?

Solution 1:

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