This is a small tutorial to help you change hostname of server without reboot the system. This will require 3 simple steps
Step 1: change hostname by command line
1 |
sudo hostname [new_host_name] |
Step 2: edit hostname file with new hostname
1 |
sudo vi /etc/hostname |
Step 2: edit hosts file
1 |
sudo vi /etc/hosts |
Edit the line below:
1 |
127.0.1.1 [new_hostname] |
It is done.