Skip to content

Instantly share code, notes, and snippets.

@boostrack
Created October 21, 2015 20:30
Show Gist options
  • Select an option

  • Save boostrack/fbce9621afa115c9677d to your computer and use it in GitHub Desktop.

Select an option

Save boostrack/fbce9621afa115c9677d to your computer and use it in GitHub Desktop.
rename p128p1 to eth0
sudo INTERFACE=p128p1 MATCHADDR=$(ip addr show $INTERFACE | grep ether | awk '{print $2}') /lib/udev/write_net_rules
http://www.hellovinoth.com/ubuntu-14-04-renaming-ethernet-interfaces-from-p1p1%E2%80%B3-to-eth0%E2%80%B3/
Here’s how to rename your network card in Ubuntu 14.04:
Get your ethernet card MAC address: ifconfig | grep HWaddr
keep it handy (open a new Terminal window for following steps)
cd /etc/udev/rules.d
backup your file: cp 70-persistent-net.rules 70-persistent-net.rules.bak
edit your file: sudo nano 70-persistent-net.rules
very carefully type: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="p*", NAME="eth0"
where the xx:xx:xx are your MAC HWAddr from Step 1
Type this all as one big long line, then save and exit.
edit /etc/network/interfaces to refer to eth0 instead of p1p1 or whatever
$reboot
login and type ifconfig to confirm your network adapter is at eth0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment