Ubuntu 18.04 - Hostname is stuck at "ubuntu"

Ubuntu 18.04 installs by default will not preserve the hostname unless specifically set in /etc/cloud/cloud.cfg to preserve hostname.

To fix this, modify the /etc/cloud/cloud.cfg file and change the "preserve_hostname" parameter from "false" to "true" - then edit the /etc/hostname file to your desired hostname and reboot your server.

After rebooting, you will notice that your new hostname is preserved and not set to "ubuntu"

Looking for a KVM VPS? Contact [email protected] - we have the performance you want, the support you've dreamed of and the price you can't say no to!

  • 79 Users Found This Useful
Was this answer helpful?

Related Articles

Can I request to install Windows Operating System?

Windows is only able to run on our Windows VPS plans, which you can view here:...

Difference between Mb/s and MB/s

In this video, we go over the differences between Megabits per second (Mb/s) and Megabytes per...

How do I use my new VPS?

So you just ordered a new VPS and want to know how to get started with using it? In this video...

How to Change SSH Port on Your VPS

Looking to add a small layer of security to your Linux VPS? Interested in learning how to change...

How to disable SELINUX on VPS

CentOS deployments by default come with SELINUX enabled. In certain circumstances, you may want...