I recently installed Ubuntu Server 16.04 onto a new hard drive. I had to install it while connected via USB on a different computer (due to the installer not able to detect a keyboard). I attached the hard drive via SATA to the new server. I can now boot and it sees the keyboard.

I however have no network.

I am missing the /etc/udev/rules.d/70-persistent-net.rules file.

When I execute sudo lshw -class network I get the following;

*-network DISABLED
description: Ethernet interface

When I execute ifconfig -a I get the following;

eno1 Link encap:Ethernet HWaddr 9c:5c:8e:95:44:6d
  • Having somewhat similar problem here as well.
    – soufrk
    Oct 6, 2016 at 6:14

2 Answers 2


my copy of that file looks like this :

# file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x10ec:0x8168 (r8169) 
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="ur::ma:ca:dd:re:ss", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

yours will need adjustment to you mac address and your device but as it says at the top of the file its generated by /lib/udev/write_net_rules

  • 1
    Hmm, I don't even have a "/lib/udev/write_net_rules" file... I'm not trying to do anything complicated yet... All I am trying to do is install a base Ubuntu OS on a new computer.
    – Fosol
    May 5, 2016 at 16:30
  • it sounds to me like the differences between these two systems might be a bit much or the install has failed elsewhere. I'm sure it would be easier to find another method of keyboard attachment than to debug missing parts of udev.
    – Amias
    May 5, 2016 at 16:34
  • @Fosol I have the same issue, no /lib/udev/write_net_rules.
    – fadedbee
    Dec 4, 2019 at 10:27
sudo udevadm trigger --subsystem-match=net --action=add

will generate /etc/udev/rules.d/70-persistent-net.rules.

Run udevadm trigger --help for more options.

  • 5
    It did not add that file on my 16.04 guest Sep 1, 2017 at 7:43
  • Likewise, this did not work for me. It produced no output.
    – fadedbee
    Dec 4, 2019 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.