iw

modern Linux wireless configuration tool, replacing iwconfig

TLDR

Scan for networks
$ iw dev wlan0 scan
Connect to open network
$ iw dev wlan0 connect SSID
Disconnect
$ iw dev wlan0 disconnect
Show connection info
$ iw dev wlan0 link
List interfaces
$ iw dev
List capabilities
$ iw phy
Show regulatory domain
$ iw reg get

SYNOPSIS

iw [OPTIONS] object command

DESCRIPTION

iw is the modern Linux wireless configuration tool, replacing iwconfig. It interfaces with cfg80211/nl80211 to configure wireless network interfaces, scan for networks, and manage connections.

PARAMETERS

dev interface

Operate on specific interface
phy phyN
Operate on specific physical device
scan
Scan for wireless networks
connect SSID
Connect to an open network
disconnect
Disconnect from current network
link
Show current connection status
reg get
Show regulatory domain information
set parameter value
Set interface parameters

INSTALL

sudo apt install iw
sudo dnf install iw
sudo pacman -S iw
sudo apk add iw
sudo zypper install iw
nix profile install nixpkgs#iw

CAVEATS

Only handles connection to open networks; for WPA/WPA2 use wpa_supplicant. Some operations require root privileges. Replaces the deprecated iwconfig tool.

HISTORY

iw is the successor to iwconfig, providing a modern interface to the Linux cfg80211 wireless subsystem.

SEE ALSO

iwconfig(8), wpa_supplicant(8), nmcli(1)