1

I accidentally removed everything inside my laptop's /etc/network/interfaces file. Now it does not find any WiFi network/SSID

I Tried to change to this but it still has problem:

auto lo
Iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp

Then I do

$ ifup wlan0

But it gets stuck and prints the following line forever:

DHCPDISCOVER on wlan0..........
0

3 Answers 3

1

If you wish to continue with /etc/network/interfaces, wireless will require the addition of the network you intend to connect to and any encryption details. I suggest:

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wpa-ssid mynetwork
wpa-psk 0123456789

Restart the interface:

sudo ifdown wlan0 && sudo ifup -v wlan0

Check:

ping -c3 www.ubuntu.com
0

Did you try restarting network-manager after adding back the file content?

sudo restart network-manager
0

Add to /etc/network/interface the following code:

auto lo

iface lo inet loopback

Then save the file and run the command:

sudo restart network-manager - as el_tigro stated.

This should reactivate the network interface and allow you to connect to the internet again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.