Ubuntu 14 Server – Change hostname

The Scenario

I have copied a virtualised Ubuntu 14.04 LTS server to expand my estate.

The Problem

The server still has the same name of the original server, this needs to be changed.

The Solution

Amend the hostname in the following files:



Then, to apply the changes, you either have to reboot the server or restart the hostname service:

sudo service hostname restart


Disclaimer: provided “AS IS” with no warranties and confer no rights


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s