Edit hostname and hosts files, then reboot device
sudo vi /etc/hostname
- Press D to delete the current name (D = delete line)
- Press i to enter insert mode
- Write the new host name
- Press <esc>:wq<enter> to save file and exit vi
sudo vi /etc/hosts
- Press D to delete the first line in the file
- Press i to enter insert mode
- Type: 127.0.0.1<tab>localhost
- Press <esc> and use arrow keys to move to start of next line
- Press D
- Press i
- Type: 127.0.0.1<tab>name (same name as entered for hostname above)
- Press <esc>:wq<enter>
sudo shutdown -r now