iwconfig command in Linux with Examples - GeeksforGeeks

22 May, 2019
iwconfig command in Linux is like ifconfig command, in the sense it works with kernel-resident network interface but it is dedicated to wireless networking interfaces only. It is used to set the parameters of the network interface that are particular to the wireless operation like SSID, frequency etc. iwconfig may also be used to display the parameters, and the wireless statistics which are extracted from /proc/net/wireless.
Syntax:
iwconfig [INTERFACE] [OPTIONS]
Example: Below command is used to display all the wireless interfaces.
Options:
essid : Set the ESSID (or Network Name – in some products it may also be called Domain ID).iwconfig [Interface] essid "Network name"
iwconfig [Interface] essid "Network name"
–help : Displays help regarding iwconfig command, such as the different modes in the options.iwconfig --help
iwconfig --help
nwid : This option sets the network ID, you may disable or enable the Network ID.Example:iwconfig [Interface] nwid on/off
Example:
iwconfig [Interface] nwid on/off
nick : This option sets the nickname or the station name.Example:iwconfig [Interface] nickname "My Node"
Example:
iwconfig [Interface] nickname "My Node"
mode : Set the operating mode of the device, which depends on the network topology. The modes can be Ad-Hoc, Managed, Master, Repeater, Secondary, and Monitor.Example:iwconfig [Interface] mode Managed
Example:
iwconfig [Interface] mode Managed
freq/channel: This option sets the operating frequency or channel in the device.Example:iwconfig [Interface] freq 2.46000000iwconfig [Interface] channel 3
Example:
iwconfig [Interface] freq 2.46000000
iwconfig [Interface] channel 3
ap : This option forces the card to register to the Access Point given by the address if it is possible.Example:iwconfig [Interface] ap 00:60:1D:01:23:45
Example:
iwconfig [Interface] ap 00:60:1D:01:23:45
rate : This option sets bitrate in b/s in supporting cards.Example:iwconfig [Interface] rate 11M
Example:
iwconfig [Interface] rate 11M
txpower : This option sets the transmit power in dBm for cards supporting multiple transmit powers.Example:iwconfig [Interface] txpower 15
Example:
iwconfig [Interface] txpower 15
sens : This option sets the sensitivity threshold. This defines how sensitive is the card to poor operating conditions (low signal, interference).Example:iwconfig [Interface] sens -80
Example:
iwconfig [Interface] sens -80
retry : This option sets the maximum number of times the MAC can retry transmission.Example:iwconfig [Interface] retry 16
Example:
iwconfig [Interface] retry 16
rts : This option adds a handshake before each packet transmission to make sure that the channel is clear.Example:iwconfig [[Interface] rts 250
Example:
iwconfig [[Interface] rts 250
frag : This option sets the maximum fragment size, which is always lower than the maximum packet size.Example:iwconfig [Interface] frag 512
Example:
iwconfig [Interface] frag 512
key/enc : This option is used to manipulate encryption or scrambling keys and security mode.Example:iwconfig [Interface] key 0123-4567-89
Example:
iwconfig [Interface] key 0123-4567-89
power : This option is used to manipulate power management scheme parameters and mode.Example:iwconfig [Interface] power off
Example:
iwconfig [Interface] power off
modu : This option is used to force the card to use a specific set of modulations.Example:iwconfig [Interface] modu auto
Example:
iwconfig [Interface] modu auto
commit : This option forces the card to apply all pending changes.Example:iwconfig [Interface] commit
Example:
iwconfig [Interface] commit
linux-command
Linux-networking-commands
Linux-Unix
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Comments
Old Comments
scp command in Linux with Examples
nohup Command in Linux with Examples
mv command in Linux with examples
Thread functions in C/C++
Docker - COPY Instruction
chown command in Linux with Examples
nslookup command in Linux with Examples
SED command in Linux | Set 2
Named Pipe or FIFO with example C program
uniq Command in LINUX with examples