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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux