As an IT administrator, you may need to force a refresh or re-scan of wireless networks from the command line. This can be useful when troubleshooting wireless connections, or when you need to find a local access point that isn’t visible in the usual way.
In some cases, you may need to use a command line interface (CLI) to force a refresh or re-scan of wireless networks. This can be done on Windows, Mac, and Linux systems. The steps you’ll need to take depend on your operating system.
On Windows
If you’re running Windows, you can force a refresh or re-scan of wireless networks from the command line. To do this, open a command prompt window. You can do this by pressing the Windows Key + R, typing “cmd”, and pressing Enter.
Once the command prompt window is open, type the following command: netsh wlan refresh
This command will force a refresh or re-scan of wireless networks. The process can take a few moments to complete, so be patient. When it’s done, you should see a list of available wireless networks.
On Mac
If you’re running Mac OS, you can force a refresh or re-scan of wireless networks from the command line. To do this, open a Terminal window. You can do this by pressing Command + Space to open Spotlight, typing “Terminal”, and pressing Enter.
Once the Terminal window is open, type the following command: networksetup -listallnetworkservices
This command will list all of the available network services. Look for the ones that have “Wi-Fi” in the name. Once you’ve identified the service you want to refresh or re-scan, type the following command: networksetup -setairportnetwork
This will force a refresh or re-scan of the specified network service. The process can take a few moments to complete, so be patient. When it’s done, you should see a list of available wireless networks.
On Linux
If you’re running Linux, you can force a refresh or re-scan of wireless networks from the command line. To do this, open a Terminal window. You can do this by pressing Alt + F2, typing “Terminal”, and pressing Enter.
Once the Terminal window is open, type the following command: iwlist
This command will force a refresh or re-scan of the specified network interface. The process can take a few moments to complete, so be patient. When it’s done, you should see a list of available wireless networks.
Conclusion
Forcing a refresh or re-scan of wireless networks from the command line can be a useful tool when troubleshooting wireless connections. The steps you need to take depend on your operating system, but the process is generally similar. On Windows, you can use the netsh wlan refresh command. On Mac, you can use the networksetup -listallnetworkservices and networksetup -setairportnetwork commands. On Linux, you can use the iwlist