- 修改IP
vim /etc/network/interfaces
内容如下
auto ens33
iface ens33 inet static
address 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.1
- 重启
systemctl restart networking
- 修改DNS
vim /etc/resolv.conf
# 添加
nameserver 114.114.114.114
微信扫一扫
vim /etc/network/interfaces
内容如下
auto ens33
iface ens33 inet static
address 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.1
systemctl restart networking
vim /etc/resolv.conf
# 添加
nameserver 114.114.114.114
相关推荐