Ubuntu16.04 modify the hostname

 

First, view the host name

1. hostname

2. uname –a

 

Second, permanently modify the hostname

1. Modify / etc / hostname

vi / etc / hostname

 

 

2. Modify / etc / hosts configuration file (optional)

vi  /etc/hosts

 

 

3. Reboot the system

sudo reboot

Guess you like

Origin www.cnblogs.com/bymingliang/p/12128421.html