1.sudo vim /etc/network/interfaces
增加如下内容
auto eth0 iface eth0 inet static address 172.20.0.116 netmask 255.255.255.0 2.sudo systemctl restart networking
1.sudo vim /etc/network/interfaces
增加如下内容
auto eth0 iface eth0 inet static address 172.20.0.116 netmask 255.255.255.0 2.sudo systemctl restart networking