I installed Ubuntu 18.04.1 LTS alongside Windows 10. When I turned on Wifi, it detected the network from my router but it was unable to connect and the network soon disappeared. I then tried using my mobile hotspot and the same thing happened.
I tried editing the /etc/network/interface file and commenting out the following two lines.
iface lo inet loopback
After doing this, I tried my mobile hotspot which worked but only for very short duration (around half a minute). My main network still doesn't work and occasionally disappears.
I have tried plugging the Ethernet cable into my laptop but that has also failed. What should I do?