etc/network/interface empty no internet connection

9,432

For Desktop versions of Ubuntu (which use NetworkManager) the /etc/network/interfaces file should contain only the following loopback interface definition:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

If your /etc/network/interfaces file is really completely empty, then paste the above into it, save and reboot.

Share:
9,432

Related videos on Youtube

Dave Wold
Author by

Dave Wold

Updated on September 18, 2022

Comments

  • Dave Wold
    Dave Wold over 1 year

    My internet connection has gone suddenly and I find my /etc/network/interfaces is completely empty, I can't ping my router and ifconfig for eth0 shows no ip address or broadcast address, I tried network manager but it can't find a network, I tried adding eth0 to ip4 with its address and dns address. I'm completely stumped. The last thing I did before I rebooted to find no connection was run this command for sound

    sudo alsa force-reload
    

    I don't know if that could've caused, I'm at a loss, if anyone knows the correct way of getting a connection back from scratch I'd be euphoric

    thanks

    I've got to the stage where if I open etc/network/interface from the command line it's completely blank but if I open the file manually its populated but i can't edit it because it's read only even if I log into root, I'm not sure if there are two files but I can't find a way of finding out their directory addresses, sorry for my lack of knowledge, I guess there's an easy way, I guess the proper one has moved, how can I change permissions if root won't let me and get it back into its proper place

  • Dave Wold
    Dave Wold about 9 years
    Thanks for advice, I followed instructions only to find that etc/network/interfaces doesn't exist, my router is up because I'm using it now on iPad wireless and my windows pc (wired) is working as well, I'm to new to Ubuntu to create the file, I can now ping router and ping 8.8.8.8, so I'm guessing DNS problem now, ipconfig one windows shows all IP addresses are the same since crash on router
  • Dave Wold
    Dave Wold about 9 years
    Thanks for help, host name lookup failure, the file has gone completely I'll have to compile a new one this should be fun
  • rbaleksandar
    rbaleksandar about 9 years
    You can use a live Ubuntu and use the file from there. Also you can do further network analysis of the situation by doing so.