iwconfig
Configure wireless network interfaces
TLDR
Show the parameters and statistics of all the interfaces
Show the parameters and statistics of the specified interface
Set the ESSID (network name) of the specified interface (e.g. eth0 or wlp2s0)
Set the operating mode of the specified interface
SYNOPSIS
iwconfig [interface] [param=value] ...
PARAMETERS
interface
Wireless interface name (e.g., wlan0); optional if scanning
essid
Set or display Extended Service Set Identifier (network name)
nwid
Set Network ID for ad-hoc networks
mode
Set operating mode: Managed, Ad-Hoc, Auto, Master, Repeater, Secondary, Monitor
freq
Set frequency/channel in Hz, kHz, MHz, or GHz
channel
Set channel number
sens
Set sensitivity threshold
bitrate
Set bitrate in bps, kbps, etc.
rate
Alias for bitrate
rts
Set RTS/CTS threshold
frag
Set fragmentation threshold
txpower
Set transmit power in dBm
retry
Set maximum packet retry limit
enc
Set WEP encryption key or mode
key
Set encoding key (s: for ASCII)
power
Set power management duration
ap
Set access point MAC address
scan
Trigger scanning for networks (no interface needed)
nick
Set station name
nname
Set nickname
DESCRIPTION
iwconfig is a command-line tool for viewing and setting parameters local to a wireless network interface in Linux. Part of the Wireless Tools package, it interacts with the Wireless Extensions API to manage Wi-Fi settings like ESSID, mode, frequency, encryption, power management, and more.
It displays current configuration when run with an interface name and no options, or sets values via parameter assignments. For example, iwconfig wlan0 essid MyNetwork associates with a network. It supports scanning networks with iwconfig scan and querying signal quality.
Though widely used historically, iwconfig is legacy. Modern kernels and drivers prefer the iw tool using nl80211/cfg80211 for fuller feature support. Still, it works on many systems for basic tasks. Run without arguments for usage summary.
CAVEATS
Deprecated; uses legacy Wireless Extensions. Newer drivers may ignore options or fail. Use iw for nl80211 support. Not all hardware/options compatible.
COMMON USAGE
iwconfig wlan0 scan - List nearby networks.
iwconfig wlan0 essid "MySSID" key s:mypass - Connect with WEP.
QUERY ONLY
Run iwconfig wlan0 to display link quality, signal level, noise, bitrate, etc.
HISTORY
Developed by Jean Tourrilhes in 1996-2000s as part of wireless-tools for early Wi-Fi support. Peaked in 2.4GHz era; kernel 4.7+ deprecates Wireless Extensions in favor of cfg80211.


