Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11th December 2012, 10:04 PM
griffinmt's Avatar
griffinmt Offline
Registered User
 
Join Date: Oct 2005
Location: Central Michigan
Age: 63
Posts: 189
windows_7ie
Changing Hostname

I have three 'cloned' systems (F17 Server with Gnome) running in a VirtualBox environment. After cloning each, I changed the hostname file and the network IP address info so they could be run at the same time. In general, this seems to work.
But not all is correct. For example, if I launch a terminal session, my prompt is in the form of
Quote:
username@newnode ~$
but the title of the terminal window reads as
Quote:
username@oldnode:~
So the system still has a record of the old node name laying around somewhere that I need to find and change.

Can anyone point me in the right direction?

TIA
__________________
Martyn Griffin
Reply With Quote
  #2  
Old 11th December 2012, 10:10 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfirefox
Re: Changing Hostname

Did you set the hostname using the hostname command?

Fedora 17 and below store the hostname in /etc/sysconfig/network (and also might be in /etc/hostname) and you can manually edit the file and change it there, but it's preferred to use hostname to set it.

Code:
su -
(root password)

hostname newhostname
Edit:
Note, you may need to reboot for everything that gets the hostname to get reset and get the new hostname.
Reply With Quote
  #3  
Old 11th December 2012, 10:11 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,300
linuxfirefox
Re: Changing Hostname

There is no 'hostname' file. Maybe you mean .... /etc/sysconfig/network


So first, edit
sudo gedit /etc/sysconfig/network
HOSTNAME=...
line.

Next you need to remove all the old DHCP network leases, since these may contain the name too.
sudo rm -f /var/lib/dhclient/dhclient*.lease

Then reboot.


Something changed in the network config in F17 that can cause the system to take it's network name from the dhcp lease, and the dhcp lease will retain the name from an old lease.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe

Last edited by stevea; 11th December 2012 at 10:14 PM.
Reply With Quote
  #4  
Old 11th December 2012, 10:21 PM
griffinmt's Avatar
griffinmt Offline
Registered User
 
Join Date: Oct 2005
Location: Central Michigan
Age: 63
Posts: 189
windows_7ie
Re: Changing Hostname

Thanks for the responses:

I did use the hostname command to change, and I am using a static ip address to boot

Just finished file scan looking for any file containing my old node name and did not find anything.

----------------------------------------------------------------------------------
It was there in /etc/sysconfig/network also. Too bad hostname command didn't do the whole job.
Thanks for the help.
__________________
Martyn Griffin

Last edited by griffinmt; 12th December 2012 at 12:34 AM.
Reply With Quote
  #5  
Old 12th December 2012, 01:35 AM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,300
linuxfirefox
Re: Changing Hostname

hostame command is meant to ONLY change the current name.
It has nothing to do with bootup config.

Your hostname should appear a zillion times under /var - your scan-fu is inferior.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
Reply

Tags
changing, hostname

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the hostname dndfan Using Fedora 5 20th December 2005 08:27 PM


Current GMT-time: 13:35 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat