Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today!
Try Our New Product Showcase!
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Redhat / Fedora Linux Help > Permintally changing host name

Forgot Password?
 Redhat / Fedora Linux Help   Help and discussion related to Redhat and Fedora Linux.

Site Navigation
Linux Forums
Linux Articles
Product Showcase
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds
Free Publications




Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 11-11-2005   #1 (permalink)
Just Joined!
 
Join Date: Oct 2005
Posts: 8
Permintally changing host name

Hi

I have a vitual private server with fedora core 2 installed

I would like to perminatly change the hostname

I have edited /etc/hosts and /etc/sysconfig/network and changed the hostname

After a reboot the files seem to revert back to the old hostname

Can anyone advise if there is nothing I can do can I right a script that will run on statup to set the hostname.

Thanks in advance
fzx5v0 is offline  



Old 11-11-2005   #2 (permalink)
Trusted Penguin
 
Roxoff's Avatar
 
Join Date: Aug 2005
Location: Nottingham, England
Posts: 2,945
use this tool as root:

system-config-network

the hostname is specified on the 'DNS' tab.
__________________
Linux user #126863 - see http://counter.li.org/
Roxoff is offline  
Old 11-11-2005   #3 (permalink)
Just Joined!
 
Join Date: Oct 2005
Posts: 8
no that doesnot work after a reboot it defaults back to the old hostname

I can not understand it
fzx5v0 is offline  
Old 11-11-2005   #4 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,696
Try the
Code:
hostname new_name_here
command.

Are you updating the hostname via dhcp by any chance?
anomie is offline  
Old 11-11-2005   #5 (permalink)
Just Joined!
 
Join Date: Oct 2005
Posts: 8
hostname new-name is only temporary until re-boot

thanks anyway

box has a static ip and is a vitual server
fzx5v0 is offline  
Old 11-12-2005   #6 (permalink)
scm
Linux Engineer
 
Join Date: Feb 2005
Posts: 1,006
I'd have done exactly what you've done to change the hostname, so the fact that it's not working is a mystery to me. Have you got anything in /etc/hostname? If you have, and it's the old name, just delete the file and see if that resolves your problem.
scm is offline  
Old 11-12-2005   #7 (permalink)
scm
Linux Engineer
 
Join Date: Feb 2005
Posts: 1,006
I'd have done exactly what you've done to change the hostname, so the fact that it's not working is a mystery to me. Have you got anything in /etc/hostname? If you have, and it's the old name, just delete the file and see if that resolves your problem.
scm is offline  
Old 11-12-2005   #8 (permalink)
Just Joined!
 
Join Date: Oct 2005
Posts: 8
scm

yes I know. I will contact my provider and ask them why.

the only reason I want to change it permintally is that when I reboot the box and forget to manually change it my hostname is not a register domain so all my e-mail get returned

If theyt give me an answer i will post it

thanks to everybody for their sudgestions
fzx5v0 is offline  
Old 10-05-2006   #9 (permalink)
Just Joined!
 
Join Date: Oct 2006
Posts: 1
Changing Linux Hostname

Guys you need to edit the following files:

/etc/hosts

/etc/sysconfig/network

/etc/sysconfig/network-scripts/ifcfg-eth0 (depends on NIC name)

then reboot.
techie_boy is offline  
Old 07-17-2007   #10 (permalink)
Just Joined!
 
Join Date: Jul 2007
Posts: 3
Your recipe worked -- but not until I rebooted. Restarting the network did not do it.
hondaguy is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Implementing Detailed User-Level Auditing of UNIX & Linux Systems
Enhance regulatory compliance and troubleshooting through detailed auditing, logging and real-time monitoring of UNIX/Linux user activity.
subscribe
Linux from Scratch - Receive Your Complimentary eBook NOW!
Linux from Scratch describes the process of creating your own Linux system from scratch from an already installed Linux distribution, using nothing but the source code of software that you need.
subscribe
A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)
Getting Started with Ubuntu 10.04 (Lucid Lynx) is a comprehensive beginners guide for the Ubuntu operating system; it features comprehensive guides, How Tos and information on anything you need to know after first installing Ubuntu.
subscribe
The Incredible Guide to NEW Ubuntu (Karmic Koala)
There are a lot of people still stuck with Windows because it's the ‘easier alternative'. Linux is both cheaper and more versatile than Microsoft's operating system, but the learning curve has frightened off many people.
subscribe
The GNU/Linux Advanced Administration
The GNU/Linux systems have reached an important level of maturity, allowing to integrate them in almost any kind of work environment, from a desktop PC to the sever facilities of a big company.
subscribe
A Newbie's Getting Started Guide to Linux
Learn the basics of the Linux operating systems. Get to know what it is all about, and familiarize yourself with the practical side. Basically, if you're a complete Linux newbie and looking for a quick and easy guide to get you started this is it.
subscribe
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe



All times are GMT. The time now is 12:53 AM.






© 2000 - - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.1