I want to reset all my networking files to default. The files include /etc/hosts, /etc/network/interfaces, /etc/resolv.conf, and more. How can I do that without re installing?

/etc/hosts     localhost
::1           localhost




##Local Loopback

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

iptables -L

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 
  • Ooh, not easy... I ended up reinstalling to get it all working again...
    – Tim
    Jul 9, 2014 at 16:12
  • Could you copy them off the live CD?
    – Tim
    Jul 9, 2014 at 16:13
  • How were they changed ? /etc/hosts you would have manually edited or changed by setting a hostname perhaps. The others are normally automatically generated by networkmanager and can be reset with networkmanager.
    – Panther
    Jul 9, 2014 at 16:17
  • @bodhi.zazen I messed with them manually. I need it to reset because my lo interface does not work. Jul 9, 2014 at 16:24
  • 1
    Post the files you edited and we can likely fix it
    – Panther
    Jul 9, 2014 at 19:21

1 Answer 1

  1. /etc/hosts should remain as it is.
  2. Delete /etc/resolv.conf, make it a symlink to /run/resolvconf/resolv.conf and run resolvconf -u.
  3. Delete the entry for eth0 from /etc/network/interfaces.

It looks like you don't have any iptables rules to be worried about.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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