LinuxCommandLibrary

iw

TLDR

Scan for networks

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

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

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

Copied to clipboard