hostname ubuntu code example
Example 1: linux change hostname
sudo nano /etc/hostname
sudo nano /etc/hosts
sudo reboot
Example 2: ubuntu chang host name
Type the following commands:
$ sudo hostname new-server-name-here
sudo nano /etc/hostname
sudo nano /etc/hosts
sudo reboot
Type the following commands:
$ sudo hostname new-server-name-here