Thursday, November 17, 2011

Changing hostname on Ubuntu Server 10.04LTS

I found out the hard way that it's changing the name of an Ubuntu Server 10.04LTS was not as straight forward as I initially thought. To save you and me the trouble and for future reference, I document how I did it here.
hostname NEW_NAME
echo NEW_NAME > /etc/hostname
cat /etc/hosts | sed s/OLD_NAME/NEW_NAME/g > /etc/
mv /etc/hosts /etc/hosts.old
mv /etc/ /etc/hosts
I hope you found the post useful. You can subscribe via email or subscribe via a feed reader to get relevant updates from this blog. Have a nice day.

No comments:

Post a Comment