Every computer have HOSTS.txt, be it MS windows or Linux or Mac. I know about it as a web developer. It is a very convenience plain text fail. I used it mainly to map internal domain for development environment.
For example, when i am developing www.davatar.net, i have the same piece of web application in my computer. I do not wants to type http://localhost/... as I wanted the development environment as similar as possible with the production environment. Thus, i used the hosts files.
In windows, it is located at C:\windows\system32\drivers\etc\HOSTS
Like many of you, I know about this file but never know about how and why it existed and why named such ways... until... i read a book about it.
I am sure you know about DNS, the domain name server.
You will be surprise if i tell you that this HOSTS file was actually the ancestor of DNS.
DNS wasn't part of the original Internet design. For the first ten years of operation, the Internet was small enough so that all the host names and IP address could fit in a single file and this is the HOSTS file that we are talking about.
In mid 1980s, this file had grown to be tens of thousands of lines long, and it needed to be changed on a daily basis. The Internet creators realized that instead of having all of the hosts located in a single file, the network itself needed to provide some sort of host name resolution service.
Thus, here come the decentralized version of it, the DNS that we have today.
It is amazing to see how Internet evolve. Most users do not know the existence of this file in their PC and thus, they get Trojan attacked and get con in pishing site and so on. It is good to hide the detail to the end user, but there is always a risk doing it.