How to change Hostname in Linux?

Optimizing and customizing your VPS/Dedicated server

How to change Hostname in Linux?

Postby Mark » Wed Dec 23, 2009 2:44 pm

Changing the hostname on Linux is pretty easy. In this tutroial you will learn how to.

Note: Root access to the server concerned is needed.

Type the following in on the command-line:

Code:

hostname hostname.yourdomain.com

And press 'return'. To confirm that the hostname has been set run the following command which will show the hostname:

Code:

hostname

And that's how to set the hostname on a Linux server!

Note: If you're doing this on a VPS Hosting you will need to contact your support department to have it reset on the node as well, as on reboot the hostname will default to the default one set.
Mark
 
Posts: 124
Joined: Fri Dec 11, 2009 2:18 pm

Return to Configuring VPS/Dedicated servers

Who is online

Users browsing this forum: No registered users and 2 guests

cron