How to fix "ioctl(SIOCGIFINDEX) failed: No such device"?

Solution 1:

when you try

root@Sphinx-PC:~#     airodump-ng mon0
Interface mon0: 

you can't find interface mon0, instead interface wlp2s0
your wlan0 has become wlp2s0 as mon0

Try

airmon-ng start wlan0
airodump-ng  wlp2s0

Solution 2:

Try running this:

sudo airmon-ng

It shows the following on my device:

PHY Interface   Driver      Chipset

phy0    wlp1s0  ath9k       Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)

Here you can see that my device's interface is wlp1s0 and you can start it like this:

sudo airmon-ng start wlp1s0

The interface name may be different for you. You might get something like this:

Found 4 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to run 'airmon-ng check kill'

  PID Name
  689 avahi-daemon
  696 avahi-daemon
  705 NetworkManager
  818 wpa_supplicant

PHY Interface   Driver      Chipset

phy0    wlp1s0      ath9k       Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)

        (mac80211 monitor mode vif enabled for [phy0]wlp1s0 on [phy0] wlp1s0mon)
        (mac80211 station mode vif disabled for [phy0]wlp1s0)

You can see [phy0]wlp1s0 on [phy0] wlp1s0mon: this is the name of my device's interface, so in this case I run this:

airodump-ng wlp1s0mon

and it works for me.