Test Wireless Signal Strength from the Command Line
In this article
You can test wireless signal strength from the command line using built-in tools like iwconfig (Linux), netsh wlan show interfaces (Windows), and airport -I (macOS). These commands display the signal quality as a percentage or dBm value, letting you quickly assess connectivity without a GUI.
Why Use the Command Line?
Command-line tools are lightweight, scriptable, and work over SSH, making them ideal for headless servers, embedded devices, or remote troubleshooting. They also provide raw data (like dBm) that GUI tools often hide, which is useful for precise diagnostics or automating signal monitoring.
How Signal Strength Is Measured
Wireless signal strength is typically reported in dBm (decibels relative to one milliwatt). The scale is negative: 0 dBm is the theoretical maximum, and lower (more negative) values mean weaker signals. Common ranges:
- -30 dBm: Excellent (as if right next to the router)
- -67 dBm: Good for most applications, including streaming
- -80 dBm: Poor; connectivity may drop
- -90 dBm: Barely usable
Many tools also show a percentage (e.g., 70%), which is a linear mapping of the dBm range, but the exact mapping varies by driver.
Linux: iwconfig, iw, and nmcli
On Linux, the most common tool is iwconfig. Run it without arguments to see all wireless interfaces:
iwconfigLook for the Link Quality and Signal level fields. For example:
wlan0 IEEE 802.11 ESSID:"MyNetwork"
Link Quality=45/70 Signal level=-67 dBmIf iwconfig is not installed, use iw (the modern replacement):
iw dev wlan0 linkThis shows the signal strength in dBm directly. Alternatively, nmcli (NetworkManager) provides a clean output:
nmcli dev wifiThis lists all visible networks with their signal percentage in the SIGNAL column.
Windows: netsh
Windows has a built-in command that shows the current connection's signal strength:
netsh wlan show interfacesLook for the Signal field, which displays a percentage (e.g., 80%). For more detail, you can also see the receive and transmit rates. To scan for nearby networks, use:
netsh wlan show networks mode=bssidThis lists all access points with their signal percentage, but note it does not show dBm values.
macOS: airport Command
On macOS, the airport utility is not in the default PATH. You can call it directly:
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -IThis prints the current network's signal strength in dBm (e.g., agrCtlRSSI: -60). To scan for networks, use:
airport -swhich shows a table with RSSI (signal) and noise values.
Interpreting the Results
Signal strength is only one factor in wireless performance. Noise, channel congestion, and interference also matter. A strong signal (-50 dBm) can still be slow if the channel is crowded. For a quick health check, compare the signal-to-noise ratio (SNR), which is signal minus noise in dB. Higher SNR is better; below 20 dB often indicates problems.
If you see a weak signal, try moving closer to the router, changing the wireless channel, or using a 5 GHz band (shorter range but often less interference). For permanent monitoring, you can script these commands to log signal strength over time.
Common Problems and Fixes
- Command not found: Install the appropriate package (e.g.,
wireless-toolson Debian/Ubuntu foriwconfig). On macOS, the airport path may change between versions; usefind /System -name airportto locate it. - No wireless interface shown: Ensure Wi-Fi is enabled and the driver is loaded. Check with
ip link(Linux) orifconfig. - Permission denied: Some commands need root. Use
sudoon Linux, or run the terminal as administrator on Windows. - Signal percentage vs dBm mismatch: Different tools use different scaling. Always prefer dBm when comparing readings across tools.
Frequently Asked Questions
What is a good signal strength in dBm?
For most home and office uses, anything above -67 dBm is good. Below -80 dBm, you may experience frequent drops or very slow speeds. However, the exact threshold depends on your environment and the sensitivity of your device's antenna.
Can I test signal strength from a remote machine over SSH?
Yes, all the commands mentioned work over SSH. This is useful for checking the signal on a headless server or a Raspberry Pi located far from the router. Just run the same command in your SSH session.
Why does my signal percentage not match the dBm value?
Different drivers and tools map dBm to percentage differently. Some use a linear scale from -100 dBm (0%) to -50 dBm (100%), while others use a logarithmic curve. Always trust the dBm value for accurate comparisons.
How can I monitor signal strength over time?
You can write a simple script that runs the command every few seconds and logs the output. For example, on Linux: watch -n 2 iwconfig wlan0 updates every 2 seconds. For logging to a file, use a cron job or a loop with sleep.
Does signal strength affect internet speed?
Yes, but not always linearly. A weak signal can cause packet loss and retransmissions, reducing throughput. However, a strong signal on a congested channel can still be slow. Run a speed test alongside a signal check to see the correlation.