Get Wireless Interface in BASH


Get Wireless Interface in BASH

Just a quicky... :)

To get the wireless interface of your computer, in a simple and "universal" (that works in every system) way, is the following. Just use this simple command:

ls /sys/class/ieee80211/*/device/net/ -1

The command will list the names of the wireless interfaces. If it's only one, you get just that one, so you can simply use it in a command like this:

sudo airmon-ng start $(ls /sys/class/ieee80211/*/device/net/ -1)

In this example, we set the interface in MONITOR mode.

Add a comment

Previous Next