Skip to content
Related Articles

Related Articles

Improve Article
How to Put WiFi Interface into Monitor Mode in Linux?
  • Last Updated : 09 Apr, 2021

Before discussing what is Monitor mode and how do we change our WiFi mode into monitor mode from managed let’s discuss that how to establish a connection to WiFi. So, at first, our system sends the packet to the WiFi and WiFi receives those packets and sends us the acknowledgment and with this process, our connection gets established with the WiFi, and if we want to communicate with another device in the network then the WiFi sends those packets to that system.

What is Monitor Mode?

 It is a mode in which the packets that every system sends to the WiFi are received by the system which is having the Monitor mode of WiFi instead of the WiFi itself. It means that all data is passed through the device which has the monitor mode of the WiFi.

The ways to do this are listed below:

  • Using Iw.
  • Using iwconfig.
  • Using airmon-ng.

Method 1. Using iw: First, check the interface of the WiFi by using the command:

sudo iw dev

Output:



Put WiFi interface into Monitor mode in LINUX

As you can see clearly from the output the WiFi interface is “wlp1s0”. After knowing the interface of the WiFi what we have to do is that down the WiFi interface then change its mode from managed to monitor and then up the WiFi. The commands used to do this task are

sudo ip link set wlp1s0 down
sudo iw wlp1s0 set monitor none
sudo ip link set wlp1s0 up

Now to check the status of the WiFi again run the first command:

sudo iw dev

Output: 

Put WiFi interface into Monitor mode in LINUX

Once your task is done don’t forget to put WiFi into Managed mode:

sudo ip link set wlp1s0 down
sudo iw wlp1s0 set type managed
sudo ip link set wlp1s0 up

Now to check the status of the WiFi again run the first command:

sudo iw dev

Output:



Method 2. Using iwconfig: Again check the interface of the WiFi but this time with a different command.

sudo iwconfig

Output: 

We have to do the same task we did in the first method i.e. down the WiFi interface, change its mode, and then up the interface but this time with different commands:

sudo ifconfig wlp1s0 down
sudo iwconfig wlp1s0 mode monitor
sudo ifconfig wlp1s0 up

Now check the WiFi status:

sudo iwconfig

Output:

Put wifi in managed mode:

sudo ifconfig wlp1s0 down
sudo iwconfig wlp1s0 mode managed
sudo ifconfig wlp1s0 up

Now to check the status of the WiFi again run the first command:



sudo iwconfig

Output:

Put WiFi interface into Monitor mode in LINUX

Method 3. Using airmon-ng:

First, you need to install aircrack-ng using the command:

sudo apt-get install aircrack-ng

Output:

Put WiFi interface into Monitor mode in LINUX

Once again check the interface of the WiFi but this time with a different command.

sudo airmon-ng

Output:

The next step is to check the interfering processes by using the following command:

sudo airmon-ng check

Output:

Put WiFi interface into Monitor mode in LINUX

Now we have to kill these processes by using the command:

sudo airmon-ng check kill

Output:

To put the interface into Monitor mode run the command:

sudo airmon-ng start wlp1s0

Output:

Now a new interface is created let’s check it using the command:

iwconfig

Output:

Put WiFi interface into Monitor mode in LINUX

Now we need to return to the original interface by using the following command:

sudo airmon-ng stop wlp1s0mon

Output:

Check the interface by using the command:

iwconfig

Output:

Put WiFi interface into Monitor mode in LINUX

My Personal Notes arrow_drop_up
Recommended Articles
Page :