Cambiar el hostname en Ubuntu Server 16.04 de forma persistente es tan sencillo como ejecutar:
# hostnamectl set-hostname "myserver"
Para comprobar el hostname status:
# hostnamectl status
Static hostname: myserver
Icon name: computer-vm
Chassis: vm
Machine ID: ffffffffffffffffffffffffffffffff
Boot ID: fbfbfbfbfbfbfbfbfbfbfbfbfbfbfbfb
Virtualization: qemu
Operating System: Ubuntu 16.04.3 LTS
Kernel: Linux 4.4.0-87-generic
Architecture: x86-64
# nano /etc/hosts
127.0.1.1 myserver