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

38,066

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.

Share:
38,066

Related videos on Youtube

Janick
Author by

Janick

I'm Amr Mohsen, 22 years of age. A metal-head & a typical Business University student, a tour guide, a swimming & diving instructor with interest in Network security & I'm new to Ubuntu, hope one day I can dive in the world of information systems as half good as I dive the ocean & be helpful to this community as it is to me, thanks for everyone bothered to help with my questions:)

Updated on September 18, 2022

Comments

  • Janick
    Janick over 1 year
    root@Sphinx-PC:~# 
    root@Sphinx-PC:~#     airmon-ng start wlan0
    
    Found 5 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
      899 avahi-daemon
      920 NetworkManager
      922 wpa_supplicant
      966 avahi-daemon
     1096 dhclient
    
    PHY Interface   Driver      Chipset
    
    phy0    wlp7s0      ath9k       Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)
    
    root@Sphinx-PC:~# 
    root@Sphinx-PC:~# 
    root@Sphinx-PC:~#     airodump-ng mon0
    Interface mon0: 
    ioctl(SIOCGIFINDEX) failed: No such device
    root@Sphinx-PC:~# 
    
  • Janick
    Janick almost 6 years
    <pre>root@Sphinx-PC:~# airodump-ng wlp2s0 Interface wlp2s0: ioctl(SIOCGIFINDEX) failed: No such device root@Sphinx-PC:~# </pre>
  • abu-ahmed al-khatiri
    abu-ahmed al-khatiri almost 6 years
    your interface said on wlp7s0 instead wlp2s0 sir
  • abu-ahmed al-khatiri
    abu-ahmed al-khatiri almost 6 years
    please check my Update Answered sir
  • Greenonline
    Greenonline over 2 years
    This is basically a variation of Nandawan's superior answer