Re: hostname automatically changed to "localhost"

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

 



On Mon, 2010-11-15 at 21:15 +0700, Hoang Le wrote:
> I have tried both.
> - Changing HOSTNAME in /etc/sysconfig/network doesn't work
> - "hostname"command just temporary changes the name

If you're using DHCP, it's possibly part of the situation.

e.g. It gets assigned "192.168.0.15".  It does a reverse DNS lookup and
finds out that numerical IP resolves as "george.example.com".  The
hostname "george" is used.

That's part of the reason why people put a hostname into
their /etc/hosts file.  It doesn't set it, as such, but gives the answer
to the question what hostname is associated with my IP.  Though
shouldn't be done if you get assigned different IPs, and you want to use
the same hostname all the time, unless you're going to keep on editing
the hosts file.

e.g. /etc/hosts could have the following:

127.0.0.1  localhost.localdomain  localhost
192.168.0.15  george.example.com  george

-- 
[tim@localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.



-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux