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] [arguments]
PARAMETERS
interface
The name of the wireless network interface (e.g., wlan0, eth1).
essid
Sets or displays the network name (ESSID).
mode
Sets the operating mode (e.g., Managed, Ad-Hoc, Master, Repeater, Secondary, Monitor).
freq
Sets the frequency or channel of the wireless interface.
channel
Sets the channel number.
ap
Sets the MAC address of the Access Point to associate with.
key
Sets the encryption key for WEP or WPA/WPA2. Different key formats and options are supported.
txpower
Sets the transmit power of the wireless interface.
rate
Sets the data rate for transmission.
nick
Sets the node name or nickname.
retry
Sets the retry limits.
frag
Sets the fragmentation threshold.
rts
Sets the RTS threshold.
power
Sets power management settings.
-v
Verbose mode to show all settings.
DESCRIPTION
The iwconfig command in Linux is a crucial tool for configuring and managing wireless network interfaces. It allows users to view detailed information about wireless network settings, such as the ESSID (network name), access point, encryption keys, frequency, and transmit power. Furthermore, iwconfig enables users to modify various wireless interface parameters.
Unlike more modern tools like iw and NetworkManager, iwconfig interacts directly with the kernel's wireless extensions. While still functional, it is considered legacy and its use is generally discouraged in favor of more robust and flexible networking tools, especially for complex network configurations. iwconfig is commonly used in embedded systems or situations where backward compatibility is paramount.
It is important to note that configuration changes made with iwconfig might not persist after a system reboot. To make permanent changes, you need to use the appropriate network configuration files or system-level tools designed for your specific distribution.
CAVEATS
iwconfig is considered a legacy tool. It is limited in its capabilities compared to modern wireless configuration tools like iw and NetworkManager. Changes made with iwconfig might not be persistent across reboots unless properly configured using network configuration files. Support for advanced wireless features may be limited.
SECURITY CONSIDERATIONS
When using iwconfig to set encryption keys, be cautious about exposing the key in plain text on the command line. It is recommended to store sensitive information securely and use appropriate configuration files or tools for managing wireless security.
ALTERNATIVES
For modern wireless configuration, consider using tools like iw which utilizes the nl80211 kernel interface, or NetworkManager, which provides a graphical and command-line interface for managing network connections.
HISTORY
iwconfig was developed as part of the wireless tools for Linux, aimed at providing basic configuration capabilities for wireless network interfaces. It predates more modern and comprehensive networking tools and was widely used in the early days of wireless networking on Linux systems. Its usage has declined as more advanced alternatives became available.