Page 1 of 1

Default WiFi adapter name (e.g. wlan0)

Posted: Thu Aug 24, 2017 8:57 pm
by Kratos
What is the wifi adapter called by default now (in Raspbian)? It doesn't seems to be wlan0 anymore, for example:

Code: Select all

sudo ifdown wlan0
returns "Ifdown: unknown interface wlan0"

Oddly ifconfig reports the dongle as wlan0.

The reason I ask this is because I am setting my pi up as a hotspot, and setting up the software requires me to know what the adapter is called.

Sorry if this is confusing.

Any ideas?

Re: Default WiFi adapter name (e.g. wlan0)

Posted: Thu Aug 24, 2017 9:18 pm
by pcmanbob
Are you using raspbian stretch by any chance ?

I have seen a post saying ifdown/ifup commands don't work under stretch.

If I come across it again I will add a link here.

edit...
mentioned here viewtopic.php?f=28&t=191061
but i think there was another mention too will keep looking.

also if you read this post the next issue of stretch will be returning to old names eth0 and wlan0

viewtopic.php?f=63&t=191010&start=75 page 4 post by ShiftPlusOne

Re: Default WiFi adapter name (e.g. wlan0)

Posted: Thu Aug 24, 2017 9:26 pm
by Kratos
Yes, I am. I didn't think it was stretch related, or I would have posted over on the mainstream one.

If you could find it, that would be great.

Re: Default WiFi adapter name (e.g. wlan0)

Posted: Thu Aug 24, 2017 9:29 pm
by Kratos
https://wiki.debian.org/NetworkConfiguration

That says the name systems were dropped to weird ones like I am getting, like wlx00f60040658.

Re: Default WiFi adapter name (e.g. wlan0)

Posted: Thu Aug 24, 2017 9:36 pm
by pcmanbob
Kratos wrote:
Thu Aug 24, 2017 9:29 pm
https://wiki.debian.org/NetworkConfiguration

That says the name systems were dropped to weird ones like I am getting, like wlx00f60040658.
only for eth and usb wifi devices built in wifi should still be wlan0 I believe.

Re: Default WiFi adapter name (e.g. wlan0)

Posted: Thu Aug 24, 2017 9:45 pm
by SurferTim
I had a problem with that also. I don't know if this is the correct fix, but it worked for me. If this is not correct, please feel free to admonish me.

Edit /etc/network/interfaces and add this at the end:

Code: Select all

auto wlan0

allow-hotplug wlan0

iface wlan0 inet manual
   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
edit: You can also use this if you don't want to edit the wpa_supplicant file
sudo ip link set wlan0 up
or
sudo ip link set wlan0 down
The Wifi must be turned on to do this.

Re: Default WiFi adapter name (e.g. wlan0)

Posted: Tue Feb 27, 2018 7:54 am
by ndpiparava
use
sudo ifconfig wlan0 down
sudo ifconfig wlan0 up

Re: Default WiFi adapter name (e.g. wlan0)

Posted: Wed Nov 20, 2019 9:10 am
by mscottm
SurferTim wrote:
Thu Aug 24, 2017 9:45 pm
I had a problem with that also. I don't know if this is the correct fix, but it worked for me. If this is not correct, please feel free to admonish me.

Edit /etc/network/interfaces and add this at the end:

Code: Select all

auto wlan0

allow-hotplug wlan0

iface wlan0 inet manual
   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
When I did the above while trying to solve a WIFI problem on my Pi, wlan0 was no longer available. Sorry that I cannot provide the entire context: sequence of commands and edits that resulted in the disappearance but I think that others should be warned.

I figured out the blocker by retracing my steps and everything was fine after removing the above lines from the /etc/network/interfaces file.
The following post was most helpful during the troubleshooting process:
https://www.raspberrypi.org/forums/view ... p?t=171482