Change NIC names for Debian 9 Stretch (from ensXY to ethX)

Discussion in 'Tips/Tricks/Mods' started by krezimor, Jun 25, 2017.

  1. krezimor

    krezimor New Member

    To change NIC names after fresh setup of Debian 9 you must add/send:
    ~# touch /etc/udev/rules.d/10-network.rules && chown root:root /etc/udev/rules.d/10-network.rules
    ~# YOURMAC="00:12:34:AB:CD:EF"
    ~# YOURNICNAME="eth0"
    ~# echo -e "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"$YOURMAC\", ATTR{dev_id}==\"0x0\", ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"$YOURNICNAME\"" >> /etc/udev/rules.d/10-network.rules
    ~# echo -e 'GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"' >> /etc/default/grub
    ~# update-grub && reboot
    Have fun!
     

Share This Page