I know that iwconfig
can provide the frequency of a Wi-Fi interface.
But is there a way to know the channel which was configured for the wireless interface?
I use Ubuntu 12.04.1.
I know that iwconfig
can provide the frequency of a Wi-Fi interface.
But is there a way to know the channel which was configured for the wireless interface?
I use Ubuntu 12.04.1.
OK, I found an answer:
iwlist wlan0 channel
Last line of the output informs about the current channel.
Because iwlist
is deprecated on many systems, you can find the channel using the newer iw
as well using iw dev
.
In order to view channels of available wireless interfaces in your locale, you could do:
airmon-ng start
and view name of wireless interface eg: wlan0
airmon-ng start wlan0
(To Put Wi-Fi Adapter in Monitor Mode with Airmon-Ng)
airodump-ng mon0
(Capture Traffic with Airodump-Ng)
airmon-ng stop mon0
(To stop Monitor Mode)There you will see channels of respective wireless interfaces under heading CH .
Besides : values wlan0
and mon0
may differ depending upon your wireless and monitor mode interface as wlp2s0
and wlp2s0mon
.
iw
Expanding on confused00's answer and the helpful comment by Gabriel Devillers, iw wlp3s0 info
prints the currently used channel among other information:
ifindex 4
wdev 0x1
addr 78:f9:d4:fa:98:0b
type managed
wiphy 0
channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz
txpower 20.00 dBm
In this example, wlp3s0
is the name of the network interface.
Alternatively, iw wlp3s0 link
shows the frequency in use, 2462 MHz:
Connected to d1:81:cb:6a:36:8c (on wlp3s0)
SSID: Your_Routers_SSID
freq: 2462
RX: 809691 bytes (6101 packets)
TX: 39608 bytes (313 packets)
signal: -58 dBm
rx bitrate: 24.0 MBit/s
tx bitrate: 72.2 MBit/s MCS 7 short GI
bss flags: short-preamble short-slot-time
dtim period: 3
beacon int: 100
iw phy
gets the supported frequencies:
2412 MHz [1] (20.0 dBm)
2417 MHz [2] (20.0 dBm)
2422 MHz [3] (20.0 dBm)
2427 MHz [4] (20.0 dBm)
2432 MHz [5] (20.0 dBm)
2437 MHz [6] (20.0 dBm)
2442 MHz [7] (20.0 dBm)
2447 MHz [8] (20.0 dBm)
2452 MHz [9] (20.0 dBm)
2457 MHz [10] (20.0 dBm)
2462 MHz [11] (20.0 dBm)
2467 MHz [12] (20.0 dBm)
2472 MHz [13] (20.0 dBm)
2484 MHz [14] (disabled)
To print the hardware capabilities of your network controller and the kernel module it uses, run sudo lspci -vv -s 03:00.0
.
iw info
is mostly worthless printing almost nothing. iw link
will print the frequency used. This can be combined with iw phy
to determine used channel. Nothing seems to display 802.11 mode (A/G/N/AC/AX).
Dec 28, 2023 at 13:07