Re: setting computer name

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

 



Jeff Vian wrote:


Javier Gonzalez wrote:

This is a bit trivial, but I figured somebody is bound to respond. I've been trying to set up a name for my laptop for the first time. So, I tried using hostname to change the name of my computer, and then I logged out to see if it would change the name in the graphical greeter. It actually did, but then it would tell me that it could not find the name I had given to my computer.

It changed the hostname

I went ahead and check /etc/hosts, and it has the following in it:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost

So it really did not change the name. I also checked out /etc/host.conf and found the following:


The hostname command does not update the /etc/hosts file. That is an action for the SA as part of the network administration, and can be done from the redhat-config-network tool, or from the command line by manually editing the /etc/hosts file.

That won't do it either. "hostname whatever" only changes the name for the current boot session. On reboot, the name will return to what it was before the "hostname" command was issued.

To permanently change the host name, you must modify the HOSTNAME=
equate in "/etc/sysconfig/network".  That can be done via GUI or by
editing "/etc/sysconfig/network" manually.  Upon booting, one of the
startup scripts looks for that equate and does a "hostname $HOSTNAME"
command.  Editing the /etc/hosts file only affects DNS resolution, and
then only if "files" is specified somewhere in the "hosts:" line of
/etc/nsswitch.conf and in the "order" line of /etc/host.conf.

order hosts,bind

however it did not have 'multi on', which I saw as being needed according to the Linux how-to help guides.

The conflict that I see is that I am using DHCP, and I switch from servers in a daily basis. I checked /etc/resolv.conf and I had something like the following

; generated by /sbin/dhclient-script
search your.isp.domain.name
nameserver 10.25.0.1
nameserver 10.25.1.2

Is there anyway for me to name my computer without incurring in further problems.

Regards,

-G






--
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens@xxxxxxxxxxxxxxx -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-      To err is human, to forgive, beyond the scope of the OS       -
----------------------------------------------------------------------




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

  Powered by Linux