Linux Commands For Wireless Network
Linux Commands For Wireless Network
Linux operating systems comes with various set of tools allowing you to manipulate the Wireless Extensions and monitor wireless networks. This is a list of tools used for wireless network monitoring tools that can be used from your laptop or desktop system to find out network speed, bit rate, signal quality/strength, and much more.
It is used to manipulate the basic wireless parameters such as ssid, mode, channel, bit rates, encryption key, power and much more. To display information about wlan0 wireless interface, enter:
iwconfig Interface-Name-Here iwconfig wlan0
Sample outputs:
wlan0 IEEE 802.11abgn ESSID:"nixcraft5g" Mode:Managed Frequency:5.18 GHz Access Point: 74:44:44:44:57:FC Bit Rate=6 Mb/s Tx-Power=15 dBm Retry long limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=41/70 Signal level=-69 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:28 Missed beacon:0
In the above output iwconfig command shows lots of information: 1. The name of the MAC protocol used 2. ESSID (Network Name) 3. The NWID 4. The frequency (or channel) 5. The sensitivity 6. The mode of operation 7. Access Point address 8. The bit-rate 9. The RTS threshold 10.The fragmentation threshold 11.The encryption key 12.The power management settings
41/70 is is an aggregate value, and depends totally on the driver and hardware.
Some parameters are only displayed in short/abbreviated form (such as encryption). You need to use the iwlist command to get all the details.
Better use the watch (gnuwatch, bsdwatch) command to run cat command repeatedly, displaying wireless signal on screen:
watch -n 1 cat /proc/net/wireless
Sample outputs:
Fig.01: Linux watch wireless signal with /proc file system Note: Again values will depend on the driver and the hardware specifics, so you need to refer to your driver documentation for proper interpretation of those values.
Fig:02: Gnome Network Manger Gnome and many other Linux desktop operating system can use NetworkManager to keep an active network connection available at all times. he point of NetworkManager is to make networking configuration and setup as painless and automatic as possible. This package contains a systray applet for GNOME's notification area but it also works for other desktop environments which provide a systray like KDE or XFCE. It displays the available networks and allows to easily switch between them. For encrypted networks it will prompt the user for the key/passphrase and it can
optionally store them in the gnome-keyring. Please note that NetworkManager is configured through graphical interfaces, which are available for both GNOME and KDE.
3. iwgetid command report ESSID, NWID or AP/Cell Address of wireless network. iwgetid is easier to integrate in various scripts. A sample output from iwgetid command:
wlan0 ESSID:"nixcraft5g"
4. iwlist command Get more detailed wireless information from a wireless interface. A typical usage is as follows:
Usage: iwlist [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] [interface] scanning [essid NNN] [last] frequency channel bitrate rate encryption keys power txpower retry ap accesspoints peers event auth wpakeys genie modulation
See also: man pages iwlist, iw, iwconfig, iwgetid, iwevent, iwlist Linux wireless wiki