User avatar
Kratos
Posts: 395
Joined: Sun Apr 12, 2015 12:41 pm

Default WiFi adapter name (e.g. wlan0)

Thu Aug 24, 2017 8:57 pm

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?
I have posted mostly with a Pi 2 running either Ubuntu MATE, or Raspbian.

pcmanbob
Posts: 11946
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

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

Thu Aug 24, 2017 9:18 pm

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
Last edited by pcmanbob on Thu Aug 24, 2017 9:56 pm, edited 1 time in total.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
Kratos
Posts: 395
Joined: Sun Apr 12, 2015 12:41 pm

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

Thu Aug 24, 2017 9:26 pm

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.
I have posted mostly with a Pi 2 running either Ubuntu MATE, or Raspbian.

User avatar
Kratos
Posts: 395
Joined: Sun Apr 12, 2015 12:41 pm

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

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.
I have posted mostly with a Pi 2 running either Ubuntu MATE, or Raspbian.

pcmanbob
Posts: 11946
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

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

Thu Aug 24, 2017 9:36 pm

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.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

SurferTim
Posts: 2054
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

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

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
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.
My advice applies to RaspiOS only. Please mention if you use another OS.

ndpiparava
Posts: 1
Joined: Tue Feb 27, 2018 7:50 am

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

Tue Feb 27, 2018 7:54 am

use
sudo ifconfig wlan0 down
sudo ifconfig wlan0 up

mscottm
Posts: 1
Joined: Wed Nov 20, 2019 9:00 am

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

Wed Nov 20, 2019 9:10 am

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

Return to “Networking and servers”