etc/network/interface empty no internet connection
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.
Related videos on Youtube
Dave Wold
Updated on September 18, 2022Comments
-
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 andifconfig
foreth0
shows no ip address or broadcast address, I tried network manager but it can't find a network, I tried addingeth0
toip4
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 soundsudo 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 about 9 yearsThanks 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 about 9 yearsThanks for help, host name lookup failure, the file has gone completely I'll have to compile a new one this should be fun
-
rbaleksandar about 9 yearsYou can use a live Ubuntu and use the file from there. Also you can do further network analysis of the situation by doing so.