I have an unmanaged VPS running Ubuntu 12.04.3 LTS (precise), the default host name it came with was very long "vps-1148921-19454.manage.myhosting.com" so I wanted to change it to something shorter like "ubuntu-1". I read that I could simply edit /etc/hostname & /etc/hosts, however my changes always get reset after every reboot.
The changes seems to take effect, however after Rebooting (sudo reboot) my changes are lost, it resets to the following:
$echo "ubuntu-1" > /etc/hostname
$hostname -F /etc/hostname
#my edit is below this line
::1 localhost ip6-localhost ip6-loopback
# Auto-generated hostname. Please do not remove this comment.
188.8.131.52 vps-1148921-19454.manage.myhosting.com vps-1148921-19454
/etc/hosts keeps the same contents
Any help would be appreciated.