In this tip we will see a command that will help us detect the signal strength of a wireless (WiFi) connection in real-time using the terminal, no need to use a third-party software with GUI.

Check firstly if the wireless connection is available with this command:

iwlist wlan0 scan

Then connect to your wireless connection with this command (replace wlan0 with your own network interface if needed):

sudo ifconfig wlan0 up

To display WiFi signal strength in the terminal, you can run this command:

watch -n 1 "awk 'NR==3 {print \"WiFi Signal Strength = \" \$3 \"00 %\"}''' /proc/net/wireless"

The output returned will be like this:

This command has also the same function:

watch -n 1 cat /proc/net/wireless

That's it!

Post a Comment