Re: Configuring hostname, domainname, and IP address

From: David Tangye (GoLinuxTakeThisOut_at_iprimus.com.au)
Date: 01/02/04


Date: Fri, 02 Jan 2004 18:38:54 +1000

On 02/01/04 14:01, after a futile battle with the keyboard, Baho Utot
wrote ...
> linuxquestion@yahoo.com wrote:
>
>
>> cat /etc/hosts
>> # Do not remove the following line, or various programs
>> # that require network functionality will fail.
>> 127.0.0.1 red red.testrac.com localhost.localdomain
   localhost
>> 10.0.0.1 red red.testrac.com
>>
>
>
> The format is FQDN followed by aliases
>
> This is what it should read instead
> 127.0.0.1 red.testrac.com red localhost.localdomain localhost
> --------------- +++ +++++++++++++++++++++ +++++++++
> where ---- is the fully qualified domainname and ++++ are aliases
>

I am running like this: not declaring my eth0 address in hosts at all
(see the comment why). Dunno if the reasoning is correct, but everything
works this way.

cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost lefty9
# Notes 14 November 2003 - DT
# Define lefty9 in localhost so gnome runs more quickly
# through the loopback interface.
# The following makes sendmail and sm-client start slowly
#192.168.0.1 lefty9 # lefty running Redhat 9

-- 
Best regards,
David Tangye
Redhat Linux user since 1997
Make sure you remove the 3 syllable spam trap in the reply address


Relevant Pages

  • Re: Dumb??? Dept.: host alias listings?
    ... how do I remove/edit the host alias lists from my ... What I could see was a comparatively long-ish list of aliases that I ... software that's added certain domains to localhost aliases. ...
    (Ubuntu)
  • Re: Two Different Formats for hosts File?
    ... >>I can find two descriptions on the web for the hosts file that appear to be ... >>127.0.0.1 localhost ... So you're saying that if the FQDN appears, then the aliases follow it, and if there ...
    (comp.os.linux.networking)
  • Re: /etc/hosts
    ... >>hostnames, or generic hostnames. ... >>The man page specifically lists localhost as a candidate for an alias. ... >>Many systems do use aliases on the 127.0.0.1 address for names like ... convention the address 127.0.0.1 is assigned to the loopback interface. ...
    (comp.os.linux.networking)
  • Re: /etc/hosts
    ... >> loopback is desired for some other name, it can be done with any ... >hostnames, or generic hostnames. ... >The man page specifically lists localhost as a candidate for an alias. ... >Many systems do use aliases on the 127.0.0.1 address for names like ...
    (comp.os.linux.networking)
  • gethostbyname() and localhost
    ... If I call gethostbyname with a parameter of "localhost" I see: ... On every Unix system I've tried I see: ...
    (microsoft.public.win32.programmer.networks)