一、修改IP地址输入以下命令:

nano /etc/network/interfaces:
auto lo
iface lo inet loopback
allow-hotplug ens18
#固定IP
iface ens18 inet static
address 192.168.1.30
netmask 255.255.255.0
gateway 192.168.1.1
#自动获取IP
#allow-hotplug ens18
#iface eth0 inet dhcp

二、修改DNS地址:

nano /etc/resolv.conf:
nameserver 114.114.114.114

三、重启电脑

reboot
Last modification:November 15, 2021
如果觉得我的文章对你有用,请随意赞赏