Посмотреть wifi сети linux

How To Show Available WiFi Networks, Their Channels, Signal Strength And More From The Command Line

This can be useful to scan available WiFi networks to quickly see their signal strength, see their channels to know which WiFi channel to use for less interference, and so on.

There are multiple ways / tools to scan for available WiFi networks and list their details, but in this article I’ll only list 2 which are easy to use and provide enough information for this task.

Option #1: Scan and list available WiFi networks using nmcli

nmcli, a command line tool for controlling and reporting the network status, can scan and list available WiFi networks regardless of the WiFi being connected to a network or not. This should already be installed on your Linux distribution, it doesn’t require specifying the interface name, and can work without super user (sudo) privileges by default or at least that’s the case in my test on both Fedora and Ubuntu.

Use nmcli to show the available wireless networks SSID, mode, channel, transfer rate, signal strength, bars and security used using:

This is how the command output looks:

nmcli wifi scan

I’ve seen some users saying that they had to run nmcli with sudo to get it to show available wireless networks, but that wasn’t the case when trying this on Fedora 31 and 30, or on Ubuntu 19.10 or 18.04. Still, in case nmcli doesn’t show anything, try running it with sudo:

To get nmcli to show some extra information about the scanned WiFi networks, including the SSID-HEX, BSSID, frequency, and more, run it like this:

nmcli wifi scan extended details

This shows the scanned WiFi details in a tabular view. In case you want to switch to multiline view, so you don’t have to expand the terminal window width to see all the details, use -m multiline , like this:

nmcli -m multiline -f ALL dev wifi

For usage in scripts, use the terse ( -t ) output mode:

Читайте также:  Комплект видеодомофона jvs skally hd wifi black

In case you want to force nmcli to rescan the available WiFi networks, use the rescan option:

Option #2: Get a list of available WiFi networks using wavemon

wavemon wifi scan

wavemon is terminal user interface (TUI) that uses ncurses, which monitors wireless signal and noise levels, packet statistics, device configuration and network parameters. Use this instead of nmcli, if you’re not using NetworkManager, or if you simply prefer this over nmcli.

Using it you can get a list of available Wifi access points, regardless if you’re connected to a WiFi network or not. The tool requires super user permissions (e.g. run it with sudo) to scan for available Wifi networks by default.

wavemon can show the following information for available (scanned) WiFi networks: SSID, BSSID (access point mac address), signal quality, signal strength, WiFi channel, and frequency.

wavemon is not installed by default, but it’s available in the repositories for many Linux distributions. Install it as follows:

  • Debian, Ubuntu, Linux Mint, Pop!_OS, Elementary OS and other Debian or Ubuntu based Linux distributions:
sudo zypper install wavemon

To scan for available WiFi networks press F3 to switch to the scan tab.

Looking for a more advanced WiFi scanner with extra features? Check out Kismet, a command line tool that got a web UI back in April, 2019.

Источник

How can I display the list of available Wi-Fi networks?

My Ubuntu laptop’s Wi-Fi works fine on various Wi-Fi networks. But the list of available networks accessed from the toolbar icon of nm-applet no longer appears. I just see the known networks. The list of hidden networks also doesn’t show any new networks. sudo iwlist scan likewise only shows known networks. How do I get a list of all available networks so I can connect to one? I am using Xubuntu 14.04.

Does terminal command nmcli dev wifi list give anything additional to what’s shown by the GUI applet?

Also worth noting that sudo iwlist scan shows more available networks than iwlist scan (without sudo ) — so this question by itself is helpful. But perhaps it should be renamed to «How can I display the list of hidden WiFi networks»?

4 Answers 4

Use the nmcli dev wifi command. It shows transfer rate, signal strength, and security (e.g. WPA) as well:

screenshot after running

For more, see nmcli ‘s manual and this for usage examples of nmcli .

Here is the pertaining mnemonic: network manager command line interface device wifi

Читайте также:  Тв приставка mag 250 wifi

The BSSID (MAC of remote access point) and other details are not shown by default, but you can show them with the -f option, e.g. nmcli -f SSID,BSSID,DEVICE dev wifi . Use -f ALL to see available fields.

@icc97 — if you only see your current network, run nmcli dev wifi rescan , wait a bit, and then try nmcli dev wifi again.

To scan all networks try using the command sudo iw dev wlan0 scan | grep SSID .

wlan0 should be replaced with real value from ifconfig of from /sys/class/net subfolder name, as stated in answer from @gujarat santana

This works better than nmcli for me because it breaks down and shows non-latin characters, where nmcli just shows a «?»

@EkriirkE well, for a more detailed breakdown on wifi networks in nmcli command you could use -f ALL option, e.g. nmcli -f ALL dev wifi . Although I admit, it’s still not as detailed as iw ‘s information.

@EkriirkE sorry, I probably misread your comment. You stated that it worked better for you since «it breaks down», and I thought you meant «breaking down» as in «showing detailed information». With that said, I am not sure who are «we» ☺ I definitely wanted the technical details on the networks, and the question or the answer don’t seem to limit the question to just SSIDs.

  1. Go to /sys/class/net you can see list of directories here.
  2. Find the wireless interface. It has wireless directories, for example in my case it’s wlp10 . You can check it using ls wlp10 . If the directory’s name different, use that directory’s name.
  3. sudo iwlist wlp1s0 scan | grep ESSID

From here you can list all available Wi-Fi access points.

Further to what has been already answered here, I’ve merged a few of them and added a little flavor of my own.

As for the nmcli answer, sure, do that if you want to install more software. But if you’re looking for Access Points, maybe you don’t have an internet connection yet and are unable to connect to install said software. With all that said, here’s my solution:

for i in $(ls /sys/class/net/ | egrep -v ^lo$); do sudo iw dev $i scan | grep SSID | awk ''; done 2>/dev/null | sort -u 
for i in $(ls /sys/class/net/ | egrep -v ^lo$); 

Lets have a look at all the contents of the location /sys/class/net. This will list all the network devices, but we’re not really interested in the loopback interface. so we’ll ignore that one

do sudo iw dev $i scan | grep SSID | awk '';done 

For each of the network interfaces we found above, lets do the scan to list all the SSIDs (and only the SSIDs)

Читайте также:  Please plug in wifi тв приставка

And ignore all the errors (like searching for SSIDs with ethernet interfaces).

And finally, If you have multiple wi-fi adapters on the system, only list each SSID once.

Источник

Is there a tool to display WiFi information in console?

Can I view detected WiFi networks details (like signal strength, encryption etc.) in command line? The more detailed — the better.

6 Answers 6

Assuming your wireless is wlan0 , of course. If you’re not sure, iwconfig should tell you.

@Ivan I think the GUI applet has some kind of caching and/or sets the limit for a viable wireless network higher or lower than the defaults in iwlist

Under Linux, you can use the iw* series of commands to configure and display information about wireless networks:

  • iwconfig — configure a wireless network interface
  • iwlist — Get more detailed wireless information from a wireless interface
  • iwpriv — configure optionals (private) parameters of a wireless network interface
  • iw — show / manipulate wireless devices and their configuration

Note: iw is the second generation utility, and should be used in preference over iwconfig , iwlist and iwpriv .

Here is a rather comprehensive list. One particularly nice way is:

watch -n 1 cat /proc/net/wireless 
sudo apt-get install network-manager nmcli dev wifi 

The only command that listed all wifi networks and their signal strength on an interface that «doesn’t support scanning» according to iwlist wlan0 scan .

Actually are all commands ( iwconfig , iwlist , . ) replaced with newest tool iw . to show signal and other info:

where wlan0 is interface name.

To fetch wireless signal informations you can use this command :

result

You must log in to answer this question.

Hot Network Questions

Subscribe to RSS

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.7.12.43529

Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group.
This site is not affiliated with Linus Torvalds or The Open Group in any way.

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Источник

Оцените статью
Adblock
detector