1. 修改网络适配器名称

    1
    2
    3
    4
    5
    6
    7
    8
    9
    sudo vi /etc/default/grub

    修改内容:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

    sudo update-grub

    sudo grub-mkconfig -o /boot/grub/grub.cfg
  2. 固定IP地址配置

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    sudo vi /etc/network/interfaces
    修改内容:
    auto eth0
    iface eth0 inet static
    address 192.168.1.128
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameserver 192.168.1.1

    sudo /etc/init.d/networking restart
    sudo service networking restart