When I do ifconfig, it shows wlan1 as


What in the world is this gibberish?

Note: This is showing up for my usb wifi adapter. My internal wlan0 shows up fine.

Note: I did an upgrade (Kali Linux 2016). Is the character encoding messed up? I don't know how to fix this. It wasn't showing this before. It used to be wlan1. :-(

I also can't even use my adapter because when I do:

airmon-ng wlx00c0ca8476b6

I get:

ERROR adding monitor mode interface: command failed: Invalid argument (-22)

So there has to be a problem other than the suggested comment below saying it's the "MAC address of the adapter." It's not supposed to show the MAC address. It's supposed to show the interface name.

  • 00c0ca8476b6 looks like a MAC address to me. Is your adapter made by alfa.com.tw?
    – DavidPostill
    Jun 7 '16 at 23:09
  • @DavidPostill Yes. It's the Alfa AWUS036NH. Before I did a dist-upgrade, this showed up as "wlan1". Jun 7 '16 at 23:39
  • There you go then. I'll wager it is the MAC address of your adapter.
    – DavidPostill
    Jun 7 '16 at 23:40
  • I'm confused. I don't understand why it formally showed up as "wlan1" and now this. Any way I can change it? Jun 7 '16 at 23:52
  • I've no idea. I don't use any kind of Linux. I'm just smart enough to figure out "this gibberish" was/is.
    – DavidPostill
    Jun 7 '16 at 23:54

Yes, that's the actual interface name, not an encoding issue. These "weird characters" are letters and numbers.

  • The general en* or wl* format (e.g. enp1s0 or wlp2s0) comes from systemd "persistent interface names", which is itself inspired by Fedora's earlier biosdevname feature. It sets interface names based on hardware features – enp* or wlp* would describe the PCI bus/slot, enu* or wlu* would describe the USB port; enx* or wlx* would describe the MAC address.

    This is useful on systems with multiple network interfaces, as they're detected in no particular order, so it's possible for eth0 or eth1 to swap places every now and then.

  • systemd, however, does not enable MAC-address-based names by default – that's a Debian-specific addition, which is only applied to USB-connected interfaces. (Those can't benefit from the default systemd naming since USB paths… aren't really that persistent nor predictable.)

    While the Debian configuration uses systemd-udev-generated names internally, it's technically implemented as a separate udev rules file and doesn't honor exactly the same configuration. It does honor net.ifnames=0 (see below).

  • The reason airmon-ng fails, I'm guessing, is that the name is too long – interface names on Linux are limited to 16 bytes, so airmon-ng has no more space to append "mon" for the new monitor interface's name.

    You don't really need "airmon-ng" with modern drivers though – all it is is a shell script to unify several different kinds of interface setup (modern and ancient).

To disable the renaming completely, boot with the net.ifnames=0 kernel parameter, e.g. add it in /etc/default/grub. (There are other methods, but they involve too much configuration editing and might change in the future.)

This should bring you back the standard wlan* names upon reboot.

To create a monitor interface manually, use iw:

iw phy0 interface add mon0 type monitor
ip link set mon0 up

Later, delete it:

iw mon0 interface del
  • I'll accept your answer since you did technically answer it. I found there is an apparent bug with many users who have Kali 2016.1. So, I downgraded to 2.0 (Sana) and it works fine. Even shows as wlan1 right out of the gate. :-) Thank you for your help though. Jun 9 '16 at 2:30
  • 1
    Kali is a Debian/Ubuntu derivative and uses largely the same core system, so everything about systemd above applies to Kali as well. Including the net.ifnames=0 parameter.
    – user1686
    Jun 9 '16 at 4:52
  • 1
    The net.ifnames=0 fix also works on Kali for Raspberry pi :) Just add it to /boot/cmdline.txt at the front!
    – Keith M
    Feb 3 '17 at 22:40

To solve this issue if you are using raspberry pi there is a simple solution to this just disable predictable network interface names

sudo raspi-config

Open network options Open Network interface name and disable predictable network interface names

That's all

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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