[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to configure hostname and /etc/hosts?




On Fri, 24 Feb 2006, Matus UHLAR - fantomas wrote:

> > 127.0.0.1	localhost.localdomain localhost
> > 
> > w.x.y.z		fnote.debian.org      fnote  www  oranythingelseyouwant
> > 
> > but real dns men, put w.xy.z and its reverse into a dns file and only
> > define localhost in /etc/hosts  
> 
> I do NOT have any primary nor own IP address, 

than do NOT put in anything else other than the 3 fields of 127.0.0.1

do not put fnote or anythign else not related to "localhost" (aka 127.*)

when your isp or coffee house let's you connect, they will give you
static iP#  and/or dhcp ... 

> What is correct then?

already posted previously

> use random IP and reconfigure notebook whenever it's
> used in a network? yah...

only if you like to break things and experiment
 
>        -s, --short
>               Display the short host name. This is the host name  cut  at the
>               first dot.
> 
> people would expext it's the "host name" (as returneg by gethostname) and
> not "fqdn" cut, right?

hostname -s  should return www
hostname -f  should return www.debian.org
hostname -d  should return debian.org

this a classic simple minded test to see whether dns and /etc/hosts is
configured right or not

and do the same/similar simple tests for reverse dns of ip#

c ya
alvin



Reply to: