My raspberry is running Ubuntu mate 16.04.2 . When ever I try to set the IP address for my pi by editing /etc/network/interfaces, my WiFi connection crashes. no matter how I tried to get my connection back there is no use, until I get /etc/network/interfaces to its default state. Any solution?
I'm not sure how much this will help, but here goes.
This is probably happening because the router you are using is configured to set the IPs of all the devices connected to it. And you manually setting the IP is causing the wifi connection to go haywire.
Why do you even want to set your own ip for the pi? Let the router configure the IP for you.