Thursday, December 17, 2015

How to change the hostname in ubuntu without restart server

sudo vi /etc/hostname
change the existing old_hostname with new_hostname
sudo vi /etc/hosts
change the existing old_hostname with new_hostname
127.0.1.1 old_hostname -> 127.0.1.1 new_hostname
Issues following command without reset the system
sudo hostname new_hostname

No comments: