I want to update the hostname for one of my VMware virtual machines running SUSE Linux Enterprise Server 11 SP3 for VMware .
I tried changing the hostname using YaST but after reboot the old name came back.
I tried echo "newhostname > /etc/HOSTNAME"
but after reboot this also goes.
I also tried hostname newhostname
but this was also lost after reboot.
How can I make the change permanent?
Best Answer
To change the hostname on a SUSE system you need to change the following files:
/etc/HOSTNAME
/etc/hosts
You may also have other configuration files where it's stored (e.g.,
postfix
configuration files), so agrep -R
for the old hostname in/etc
is probably a good idea:where <oldhostname> is the old hostname).