local host name changing

Robert Locke rlocke at ralii.com
Sat Sep 25 14:07:04 UTC 2004


On Sat, 2004-09-25 at 03:59, Juan L. Pastor wrote:
> On Sat, 2004-09-11 at 21:59, Robert Locke wrote:
> > The initial hostname is set in the file /etc/sysconfig/network.
> > 
> > Be aware that the networking startup scripts may obtain the hostname
> > from a DHCP server or DNS server (as a reverse lookup).
> > 
> > If you set the name to something in /etc/sysconfig/network, it is
> > probably a good idea to have that name appear in /etc/hosts (as you were
> > thinking), to ensure that your machine knows how to find itself.
> 
> On my system I get:
> 
> [jlpastor at kalimotxo jlpastor]$ hostname
> kalimotxo.euskal.net
> [jlpastor at kalimotxo jlpastor]$ hostname --fqdn
> kalimotxo.euskal.net
> [jlpastor at kalimotxo jlpastor]$ dnsdomainname
> euskal.net
> [jlpastor at kalimotxo jlpastor]$
> 
> My /etc/sysconfig/network is:
> [jlpastor at kalimotxo jlpastor]$ cat /etc/sysconfig/network
> NETWORKING=yes
> HOSTNAME=kalimotxo.euskal.net
> 
> and my /etc/hosts:
> [jlpastor at kalimotxo jlpastor]$ cat /etc/hosts
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1               kalimotxo.euskal.net kalimotxo
> localhost.localdomain localhost
> 
> How is it that I get the same output for the hostname and hostname
> --fqdn commands?
> 
> Juan

Not sure I see a problem here....  Isn't life fully-qualified?  <big
grin>

Perhaps you are looking for the command "hostname --short"?

--Rob






More information about the users mailing list