Ubuntu 18.04 LTS 修改Host,使用Host访问

两台电脑做相同修改。

hostnamectl 

vi /etc/hosts

127.0.0.1       localhost 
127.0.1.1       allspark-VirtualBox
192.168.1.76    allspark-VirtualBox-76
192.168.1.77    allspark-VirtualBox-77

:wq

reboot

ping allspark-VirtualBox-77

参考:

https://www.cnblogs.com/kerrycode/p/3595724.html

原文地址:https://www.cnblogs.com/hanfan/p/12910789.html