打开配置文件
sudo nano /etc/network/interface
修改ip
interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
iface enp2s0 inet static
address 192.xxx.xxx.xxx
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
^o 保存
^x 退出