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] [parameter value...]
iwconfig --help
iwconfig --version
PARAMETERS
[interface]
Displays wireless configuration for a specific interface (e.g., wlan0). If omitted, shows all wireless interfaces.
essid name|off|any
Sets the wireless network name (Extended Service Set Identifier).
mode managed|ad-hoc|master|monitor|auto
Sets the operating mode of the wireless interface.
channel N|auto
Sets the wireless channel number.
freq N[G|M|k]|auto
Sets the operating frequency (e.g., 2.412G for 2.412 GHz).
ap addr|auto|off
Sets the Access Point (AP) BSSID to associate with. Use auto to let the driver choose, off to disable AP lock.
key key|[S:key]|off|open|restricted
Sets the WEP encryption key. Hexadecimal or ASCII string (preceded by 's:').
power period N|timeout N|off
Configures power management for the interface, defining sleep periods or timeouts.
rate N[G|M|k]|auto|fixed
Sets the bit rate for data transmission.
txpower N|off|auto|fixed
Sets the transmit power level (in dBm or mW).
retry limit N|lifetime N
Sets the retry limits for packet retransmission.
nick name
Sets a nickname for the interface, used for identification in some contexts.
rts N|auto|off
Sets the RTS (Request To Send) threshold, controlling when RTS/CTS handshaking is used.
frag N|auto|off
Sets the fragmentation threshold, determining the maximum size of data frames before fragmentation.
sens N
Sets the sensitivity threshold for the interface, affecting reception quality.
--help
Displays a brief help message about the command options.
--version
Displays the version information for the iwconfig utility.
DESCRIPTION
iwconfig is a Linux utility used to configure and view parameters of wireless network interfaces. It allows users to set various wireless-specific settings such as the ESSID (network name), operating mode (e.g., managed, ad-hoc), channel, encryption key (primarily WEP), and power management options. While still functional, it largely relies on the older Linux Wireless Extensions (WE) and is often superseded by more modern tools like the iw command or network managers for advanced configurations and current security protocols like WPA2/WPA3.
CAVEATS
iwconfig primarily relies on the Linux Wireless Extensions (WE), an older kernel interface for wireless drivers. As such, it may not provide full control or accurate information for modern wireless hardware that uses the newer nl80211 stack. It lacks native support for advanced security protocols like WPA2 and WPA3, and its functionality can be limited by the driver's implementation of WE.
SECURITY LIMITATIONS
iwconfig is fundamentally limited in its support for modern wireless security. It is primarily capable of configuring WEP and basic WPA1 pre-shared keys. For networks secured with WPA2 or WPA3, which are the current industry standards, dedicated tools like wpa_supplicant or comprehensive network management services are required, as iwconfig cannot handle the complex authentication and key management processes involved.
DRIVER COMPATIBILITY
The effectiveness and available options of iwconfig are heavily dependent on the specific wireless driver in use. Not all drivers fully implement the Wireless Extensions API, and newer drivers might be exclusively designed to interface with nl80211, rendering iwconfig less useful or completely ineffective for those devices. Users might observe incomplete information or command failures on modern hardware.
HISTORY
iwconfig emerged as part of the Linux Wireless Extensions (WE) project, designed to standardize wireless device configuration in Linux. It became a primary tool for managing Wi-Fi networks in the early 2000s, paralleling ifconfig. However, with the evolution of wireless technology and the introduction of the more robust nl80211 kernel interface, iwconfig's role has diminished in favor of the iw command and network managers. Despite this, it remains part of many distributions for backward compatibility and for drivers that still rely on the legacy WE API.
SEE ALSO
ifconfig(8), iw(8), ip(8), wpa_supplicant(8), nmcli(1)