hay, thanks for the tutorial on how to change the domain name and hostname on a linux server which i have for my wallpaper websites.. i learned alot. so here is my version, i took notes and this is what i did. ill give you some examples:

my old server was: ns5.webune.com
DOMAIN NAME: webune.com

my new server should be: ip-208-109-209-180.ip.wallpaperama.com
DOMAIN NAME: ip.wallpaperama.com
HOSTNAME: ip-208-109-209-180

ok, so now i login to my linux machine as root, if you are not logged in as root but have root privilages, you can use the su - command. now that i have root access i send these commands:

nano /etc/sysconfig/network


after you have edited the changes save the changes.. i use control+x in nano. if you are using VI then you should know how to save it

now send this command to change to the hostname:
hostname ip-208-109-209-180.ip.wallpaperama.com

ok, one more thing to do, now i have to update the /etc/hosts file so send this command:

nano /etc/hosts

after you send the nano /etc/hosts command, you will see something like this:
# Do not remove the following line, or various programs
# that require network functionality will fail. ns5.webune.com ns5 localhost.localdomain localhost ns5.webune.com ns5
::1 localhost6.localdomain6 localhost6
as you can see from my example output, my ip is and my host and domain name is ns5.webune.com

now i want to change it to make it look like this for my new domain and hostnames
# Do not remove the following line, or various programs
# that require network functionality will fail. ip-208-109-209-180.ip.wallpaperama.com ip-208-109-209-180 localhost.localdomain localhost ip-208-109-209-180.ip.wallpaperama.com ip-208-109-209-180
::1 localhost6.localdomain6 localhost6
as you can see, i only change the domain name and the host, i left my ip address the same

now its time to reboot to make all the changes take affect so i send this command:

now when the server comes up, you can see the the machine will have the new hostname, you can confirm by sending this command:

another sure way to test is to send the ping command, so i would send this command:
ping ip-208-109-209-180.ip.wallpaperama.com

WARNING: please NOTE, i did this on a development machine. i would not advise you to do this on a production machine unless you know what you are doing. also, please make note that i was using red hat fedora core 7, so it might or it might now work on other distributions. i know it should work on any redhat distribution. but not sure if will work on mandrake or suse for example..

if you got another distribution and you know how to do this please let me know. or if there is another or easier way tot do this, please also let me know so we can learn from each other. im not an expert, but im posting here so hopefully it will help a newbie like me someday.

many thanks.