Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to use iwlist to find WiFi channels used in your neighborhood

📅 2014-Jan-18 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ iwlist, wireless channel ⬩ 📚 Archive

The maximum wireless transfer speed that can be achieved between your computer and your wireless router is dependent on which wireless channels are being used in your neighborhood. If your wireless router is using a channel that is used by lots of your neighbors then you will experience less speed. So, it is a good idea to check what wireless channels are being used in your neighborhood and pick one that is not used or less used.

You can see the channels being used in your neighborhood using this command:

<code>$ sudo iwlist wlan0 scan | grep Frequency | sort | uniq -c | sort -n

iwlist in scan mode finds information about all the wireless networks in the neighborhood using the wlan0 network interface of your computer. The lines with Frequency have the frequency in GHz and the channel number. sort followed by uniq -c counts the number of networks using the same channel. And finally sort -n rearranges the results in ascending order of channel used.

Tried with: Ubuntu 12.04 LTS