iw
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 interfacephy phyN
Operate on specific physical devicescan
Scan for wireless networksconnect SSID
Connect to an open networkdisconnect
Disconnect from current networklink
Show current connection statusreg get
Show regulatory domain informationset parameter value
Set interface parameters
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)


