Change hostname
###How to change hostname on Debian Server####
-
What is Hostname?
A host name is a name that is assigned to a host that uniquely identifies it on a network and thus allows it to be addressed without using its full IP address. Host names are very useful because it is much easier for humans to remember them than to remember IP addresses, which can contain as many as 12 digits under the currently mainstream IPv4 addressing scheme (or as many as 32 hexadecimal digits under the next-generation IPv6 addressing scheme). Moreover, it is a simple matter for system administrators to assign host names on a LAN or other private network.For more detail,please go through this website:http://www.ip-adress.com/host/
-
Step to change Hostname: From thserver to dns
root@thserver:~# nano /etc/hostname
GNU nano 2.2.4 File: /etc/hostname Modified
dns
File Name to Write: /etc/hostname
^G Get Help M-D DOS Format M-A Append M-B Backup File
^C Cancel M-M Mac Format M-P Prepend
###We have to stop and start service of hostname
root@thserver:~# /etc/init.d/hostname.sh stop
root@thserver:~# /etc/init.d/hostname.sh start
###After, we have logout and login the server
root@thserver:~#logout
login as: root
root@10.1.3.131’s password:
Linux thserver 2.6.32-5-686 #1 SMP Mon Jun 13 04:13:06 UTC 2011 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Oct 13 06:33:27 2012 from 10.1.3.74
root@dns:~#
-
We can use command “hostname” to check our hostname server
root@dns:~# hostname
dns
root@dns:~#
####You have done a good job####