How to rename an ONMSi Linux server

Knowledge Base - How To

How to rename a Linux server (as in the hostname).

Define the server name with only letters, numbers and dash – (underscores are forbidden).


To rename a machine you need to disable the cloud configuration (ubuntu OS only)

 

• sudo touch /etc/cloud/cloud-init.disabled

 

then rename the server


• sudo hostnamectl set-hostname servername

 

then reboot

• sudo reboot