11

How do I get Ubuntu to figure out the interfaces available on my computer and generate a new /etc/network/interfaces file? It created it the first time so I know it can somehow.

Is there something like dpkg-reconfigure <what?> that would just recheck for me?

2
  • 1
    What would you want this for?
    – Zoredache
    Jul 1, 2010 at 1:35
  • I'm +1-ing this question because we need non-linux people to be able to configure networks for our appliance. Something e.g. curses based that makes it easy is what I'm looking for... Jan 13, 2012 at 9:53

3 Answers 3

4

in ubuntu 14.04.1 THIS happens if you clone a system to other hardware as /etc/udev/rules.d/70-persistent-net.rules contains MAC address's of ethernet hardware on the source computer.

YES - just deleting /etc/udev/rules.d/70-persistent-net.rules allows things to be refreshed to a working state at reboot.

1
  • 2
    Only true if using the legacy eth0 style network names. With the new 'predictable network interface names' introduced around ubuntu15.10 the 70-perisistent-net.rules trick no longer applies.
    – spuder
    Jan 18, 2017 at 18:13
1

/etc/network/interfaces is generated by the actual installer, not any of the packages on your system:

opus:~ broder$ dpkg -S /etc/network/interfaces
dpkg: /etc/network/interfaces not found.

Because it's not managed by any particular package, no package is going to modify the file.

If you want to add new interfaces to /etc/network/interfaces, you have to do that manually. Alternatively, if you want your network interfaces to be managed automatically by your system, I believe the official answer at this point is to use NetworkManager. NetworkManager will handle configuration for any network interface that's not listed in /etc/network/interfaces.

1

Try run below command

dpkg-reconfigure ifupdown

possibly.

However, you are probably running into an issue with udev. If you have rebooted, and eth0 disappeared:

ifconfig -a

you can mv/rm the file in /etc/udev/rules.d/70-persistent-net.rules and reboot, and your primary ethernet card should become eth0 again.

This would happen if you switched motherboards/network cards.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .