Thursday, December 24, 2015

How to Change Hostname ?

"hostname" is the command to check current hostname .

syntax  to change hostname :-  hostname <serverhostname>

In below example you can see on how we can change hostname to linuxtechnotes.  Current server  hostname is  localhost.localdomain

From above screen you can see ,you need to relogin to change effect to shell .

Again , its temporary change . If you want to make it persistent during system boot . we need to specify new hostname in /etc/sysconfig/network file .

No comments:

Post a Comment