Home > Support > HOWTO List > Linux > Hostname

Working with Linux howtos

Changing the hostname of your VPS

Want to change your server's hostname?

The hostname of a Linux machine is set during startup based on the information contained in a couple of configuration files. You can also change it while it's running, but the change won't persist across reboots unless you also update those configuration files. There are a few files you should check.

Edit the name in /etc/hosts

See 'man 5 hosts' for more info.

Edit /etc/hostname.  e.g.  echo "yourserver.com" > /etc/hostname

See http://www.debianadmin.com/change-hostname-or-server-name-of-a-linux-machine.html for more info.

On RH-based machines, edit /etc/sysconfig/network.  It'll contain something like this:

NETWORKING=yes
HOSTNAME="yourserver.com"

Reboot your server, or just run: "hostname --file /etc/hostname" i.e. set the host name based on the name in the /etc/hostname file.

Applications that were running before you changed the hostname will probably not reflect the new host name until after an application (or server) restart.

Of course the server's hostname can be anything you want it to be.  It doesn't mean anything to external servers.  They will rely on public DNS information.

Updating your host name in the RimuHosting control panel

The hostname in your Rimuhosting control panel, is just a database entry, and not tied to your actual hostname.

To avoid confusion after you change your server hostname and you can update your server name in our control panel.

Go to you control panel, and under "<a href='/cp/vps'>VPS Management</a>" click the VPS you want to change.

On the manage page, hover your mouse over the field for the hostname, and you will see that is an editable field.  Change the name and click ok.