When I don't have any USB dongles connected to the Raspberry Pi, wlan0 is assigned to the embedded WiFi adapter. However, when I have USB WiFi dongle connected, the dongle gets assigned wlan0 and the embedded WiFi addapter gets assigned wlan1.

Is there way to reserve wlan0 for the embedded WiFi adapter?

RASPBIAN OS: Linux raspberry3 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux
  • "Is there way to reserve wlan0 for embedded wifi-adapter?" -> Yep, look into udev.
    – goldilocks
    Commented Jun 20, 2016 at 18:14
  • @goldilocks could you provide more detailed explanation? Commented Jun 20, 2016 at 18:24
  • No, but I am sure if you search around online you will find one. Just leave "raspberry pi" out of your search terms as it is part of GNU/Linux which has been around for more than a decade. Try "linux udev network interface". There are probably hundreds or thousands of explanations and examples about it here, on our larger sibling site Unix & Linux, and online generally. It may take some time and experimentation for you to work out, but like I said, yes it is possible.
    – goldilocks
    Commented Jun 20, 2016 at 19:39
  • This crumb trail may provide a short cut through the woods: raspberrypi.stackexchange.com/questions/29819/… (note link to the re-post in the final comment). It doesn't exactly explain, but you may want to tuck it away in your mind while you are trying to work it out.
    – goldilocks
    Commented Jun 20, 2016 at 19:41

1 Answer 1


Is it possible to set wlan{number} for wireless card by MAC address. It needs to add rule to /etc/udev/rules.d/70-persistent-net.rules file. For example:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b8:27:eb:53:4d:fd", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

MAC address can be reached by ifconfig command.

Your Answer

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

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