Re: Where is the computer network name set and stored ?

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

 



On Wed, 2011-09-21 at 23:51 -0600, linux guy wrote:
> It appears to me that the only way to truly change the hostname of a
> machine is to edit /etc/sysconfig/network. But I might be wrong.

Not the only way.  As others will say, you can set it in a file.

Or, the computer can work it out for itself, when it brings the network
interface up.  

When assigned an IP, or bringing up an interface using an IP that you've
preconfigured it with, it does a name lookup to find the name associated
with that IP.  This lookup can be answered by your hosts file, or a DNS
server.

e.g. Up comes eth0.
     eth0 is 192.168.1.2  (by whatever method that address is assigned)
     get the named address for that IP.
     finds out it's mailserver.example.com
     works out that its hostname is mailserver,
     and its domain name is example.com

So, the hosts file (or DNS server) doesn't so much "set" the hostname,
but answers the "Who am I?" question.  (Almost the same thing, but not
quite, to be pedantic.)

-- 
[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