If you need to change server hostname
1 2 3 |
sudo vi /etc/hostname sudo vi /etc/hosts sudo restart |
In vi editor use Shift+i for insertion mode, Shift+; for command line mode.
For changes saving use wq command, for exit without saving use q! command
After reboot check new hostname with
1 |
hostname |