}

iwconfig vs iw: Which WiFi Command to Use in Linux 2026

iwconfig vs iw: Which WiFi Command to Use in Linux 2026

If you have been managing wireless interfaces on Linux for a while, you have almost certainly used iwconfig. It is familiar, it is installed on most systems by default, and it gets the job done. The problem is that it has been deprecated for years, and on modern kernels it may silently fail or return incomplete information. The replacement is iw, and this guide explains the difference, why the switch happened, and how to perform every common wireless task using both tools.

Why iwconfig is deprecated

iwconfig is part of the wireless-tools package, which was the standard user-space interface for the Linux wireless subsystem through the early 2000s. That subsystem, known as Wireless Extensions (WEXT), was a monolithic kernel API that exposed wireless hardware configuration through ioctl calls.

As wireless hardware became more complex — 802.11n, 802.11ac, multiple antennas, VHT capabilities, mesh networking — the WEXT interface could not keep up. The kernel developers introduced a new subsystem called cfg80211 and a new user-space communication channel called nl80211 (Netlink 802.11). Starting around kernel 2.6.22, new drivers were written against cfg80211 rather than WEXT.

iw is the user-space tool designed for nl80211. It communicates with the kernel through Netlink sockets and supports the full feature set of modern wireless drivers.

The wireless-tools package (which provides iwconfig, iwlist, iwspy, iwpriv) still exists in most distributions and still works for drivers that maintain WEXT compatibility shims. However, many modern drivers do not implement those shims, and the kernel maintainers have been progressively removing WEXT support. On a system running a recent kernel with a modern WiFi adapter, iwconfig may show empty output where iw shows full capability information.

Quick comparison

Feature iwconfig / wireless-tools iw
Underlying API Wireless Extensions (WEXT) nl80211 / cfg80211
Package wireless-tools iw
Driver support Legacy + some modern Modern (all cfg80211 drivers)
VHT / 802.11ac info No Yes
Monitor mode Partial Full
Mesh / P2P support No Yes
Active development No (maintenance only) Yes
Availability Pre-installed on many distros May need manual install

Installing iw

On Debian/Ubuntu:

sudo apt install iw

On Fedora/RHEL/CentOS:

sudo dnf install iw

iw is already included in most modern desktop distributions. If you are working on a minimal server install or an embedded image, you may need to add it explicitly.

Listing wireless interfaces

With iwconfig, running it with no arguments lists all interfaces including wired ones, and marks the wireless ones with their SSID:

iwconfig

With iw, the equivalent is:

iw dev

This prints only wireless interfaces, along with their type (managed, monitor, mesh point, etc.), channel, and other configuration details.

Scanning for networks

iwconfig itself does not scan — you need the companion tool iwlist:

sudo iwlist wlan0 scan

With iw:

sudo iw dev wlan0 scan

The iw output is significantly more detailed. It shows the full BSS information including supported rates, RSN/WPA information elements, HT and VHT capabilities, and signal strength in dBm. iwlist output is more compact but misses 802.11ac/ax fields entirely.

Checking signal strength and link quality

With iwconfig:

iwconfig wlan0

The output includes Link Quality, Signal level, and Noise level in a proprietary unit format that varies between drivers.

With iw:

iw dev wlan0 link

This shows signal in dBm, which is a standardized unit and easier to interpret. A signal of -50 dBm is excellent; -70 dBm is acceptable; -85 dBm and below will cause connection problems.

To get a continuous signal reading:

watch -n 1 iw dev wlan0 link

Setting a channel

With iwconfig:

sudo iwconfig wlan0 channel 6

With iw, you must specify the frequency in MHz rather than the channel number:

sudo iw dev wlan0 set channel 6

Or using frequency directly:

sudo iw dev wlan0 set freq 2437

For 5 GHz channels, iw is required because iwconfig does not understand the full 5 GHz channel numbering scheme reliably.

Enabling monitor mode

Monitor mode allows the wireless interface to capture all 802.11 frames, not just those addressed to the host. This is used in packet analysis, wireless auditing, and research tools like airodump-ng.

With iwconfig:

sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor
sudo ifconfig wlan0 up

Some drivers silently ignore the mode change through the WEXT interface.

With iw, the recommended approach is to create a new monitor interface rather than changing the mode of the existing one:

sudo iw dev wlan0 interface add mon0 type monitor
sudo ip link set mon0 up

To remove the monitor interface:

sudo iw dev mon0 del

If you prefer to change the existing interface mode (requires bringing it down first):

sudo ip link set wlan0 down
sudo iw dev wlan0 set type monitor
sudo ip link set wlan0 up

Connecting to an access point manually

iwconfig can associate with an open (unencrypted) network:

sudo iwconfig wlan0 essid "NetworkName"

iw can do the same:

sudo iw dev wlan0 connect "NetworkName"

Neither tool handles WPA/WPA2/WPA3 encryption. For encrypted networks you need wpa_supplicant or a higher-level tool like nmcli. These low-level tools are only useful for open networks or when you are building your own connection stack.

Checking driver and hardware capabilities

This is where iw has no competition. iwconfig cannot report hardware capabilities.

iw list

This command dumps everything the driver exposes: supported bands, rates, ciphers, interface combinations, regulatory domain, VHT capabilities, supported features, and more. It is essential when troubleshooting why a feature like 802.11r fast roaming or AP mode is not working — you can verify whether the driver claims to support it at all.

iw phy phy0 info

This gives the same output scoped to a specific physical device (useful when you have more than one WiFi card).

When you still need iwconfig

There are a few situations where iwconfig or wireless-tools remains relevant:

  • You are working with very old hardware that only has a WEXT driver and no cfg80211 port.
  • You are running a kernel older than 2.6.22.
  • You are using a script written for iwconfig output format and have no control over the script.
  • The iw package is not available and cannot be installed on a locked-down system.

In all other situations, prefer iw. It is more accurate, more complete, and will continue to receive updates as wireless standards evolve.

Summary

iwconfig works for basic tasks on older systems and drivers, but it operates on a deprecated kernel interface and cannot expose the capabilities of modern wireless hardware. iw is the correct tool for any modern Linux system. The syntax is slightly different but the concepts map directly. If you are writing new scripts or documentation, use iw. If you are maintaining old scripts that rely on iwconfig output, consider migrating them — the WEXT compatibility layer may eventually be removed entirely.