Run the following command to change the hostnames in the files:
1 | sudo vi /etc/hostname |
Then restart the computer. The hostname should be the new one.
Note:
If you didn’t change the hostname in the “/etc/hosts” files, you will get “unable to resolve host …” error when running the command:
1 | sudo apt-get clean |