Addition to the last post:
Here are some suggestions for pages with commands which edit the hosts file. These are 3rd party links and we can't guarantee that these are working solutions in each case.
http://stackoverflow.com/questions/4222045/how-to-edit-hosts-file-via-cmd
https://gist.github.com/eveyrat/9428342