[techtalk] localhost, etc.

Wendt,Andrew awendt at neo.rr.com
Sat Oct 16 17:12:37 EST 1999


On Sat, 16 Oct 1999, you wrote:
>This is a question I don't really even know how to start asking.
>
>I'm running DeadRat 6.0 [;-)] on a home PC that isn't connected to any
>networks (for the time being).
>
>What exactly does the /etc/hosts file do?

The /etc/hosts file is consulted when you attempt to look up a hostname to find
its address. You probably know that when you want connect to other computers
over a network by name, you first have to look up the numerical address of that
system. If you want to look up a random hostname like "linuxchix.org" it will
ask an internet nameserver for the address. You can put your own mappings of
numeric addresses to hostnames in the /etc/hosts file. This can be useful if
you have machines on a local network that don't have real internet names, or
you want to assign your own nicknames to computers.

>Here's my /etc/hosts file:
>127.0.0.1       nzingha nzingha.org

This just means "the address for the computer named "nzingha" or "nzingha.org"
is 127.0.0.1". 127.0.0.1 is a special address that points to your own computer.

Here's my file:
127.0.0.1       localhost
192.168.0.3     sumo
192.168.0.47    robotnik
204.210.223.24  news-server

In the past I've added ad.doubleclick.net to my /etc/hosts with an address of
127.0.0.1. This took care of the banner ads on Altavista that were bothering me.

I don't know how this is related to your MySQL problems, unfortunately.

TTFN

************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list