Debian11 修改IP地址和DNS

阅读 135

2023-01-28


  1. 修改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

  1. 重启

systemctl restart networking

  1. 修改DNS

vim /etc/resolv.conf

# 添加
nameserver 114.114.114.114

相关推荐

精彩评论(0)

0 0 举报