Ubuntu – wifi and ethernet keep disconnecting

networkingwireless

I don't know if this has been asked before, but the internet (ethernet and wifi) is constantly disconnected. I've checked the router, via other devices (such as cell phone and tablet) and access to internet is fine. Even when I boot Windows 7 on my computer it's able to connect and stay connected. When I'm running ubuntu (15.04 I believe), when I first start it up it connects just fine to the Wi-Fi network I use. But after using the internet for some time it all of a sudden disconnects and I'm unable to connect again to the router I use. It's says "wifi networks disconnected". But the strange part is when I boot Windows 7 on my computer it's able to stay connected to the Wi-Fi network and access the Internet, it's just the Ubuntu OS I seem to be having some trouble with here.

Best Answer

It may just be an internal error.

sudo apt-get purge network-manager
sudo apt-get update
sudo apt-get autoremove
sudo apt-get upgrade
sudo apt-get install network-manager
sudo apt install ubuntu-desktop

Do that then reboot.