Tuesday, June 14, 2011

How to change the hostname of your Debian 6.0 server?

1. Edit the file "/etc/hostname" and change the name to hostname that you want.

Example:

Hostname is asteriskserver1 and you want to change it to asteriskserver2

In your debian console:

$nano /etc/hostname
asteriskserver1

Change it to:

$nano /etc/hostname
asteriskserver2

2. Save the file.
3. Run "/etc/init.d/hostname.sh start" to refresh the hostname of your server.
$/etc/init.d/hostname.sh start

No comments:

Post a Comment