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

时间:2024-11-15 08:03:55

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

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

  设置生效

 update-grub

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

auto eth0
iface eth0 inet static
address 10.10.10.201
network 255.255.255.0
gateway 10.10.10.1
dns-nameservers 10.10.10.1 114.114.114.114

  

  重启主机即可

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