Ubuntu将网卡名称eno160改为eth0并且设置静态IP

  修改配置文件/etc/default/grub

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

   设置生效

 update-grub

   修改配置文件/etc/network/interfaces

iface eth0 inet static
address 172.16.20.1
network 255.255.255.0
gateway 172.16.20.251
dns1 114.114.114.114

   重启主机即可

猜你喜欢

转载自www.cnblogs.com/minseo/p/10223611.html
今日推荐