CentOS
# nano /etc/sysconfig/network
# /etc/hosts             127.0.0.1 HOST_NAME

Ubuntu

  • Edit /etc/hostname, make the name change, save the file.
  • You should also make the same changes in /etc/hosts file
  • Run sudo /etc/init.d/hostname restart or sudo service hostname restart
Advertisements