Step1:ifconfig查看网卡名,如enp0s3
Step2:修改文件将ip地址设置为192.168.0.10(举例)
Step3:修改/etc/network/interfaces
修改为:
auto enp0s3
iface enp0s3 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 202.96.209.133
dns-nameservers 8.8.8.8
Step4:重启网络/etc/init.d/networking restart
网友评论