6 ms·
How to Show Available WiFi Networks on Linux from the Command Line
- smegma2 7y agoI usually go with nmtui. You can also connect using it.
- spacedome 7y agoIf you switch to iwd from wpa_supplicant there is also iwctl.
- CaptainMarvel 7y agoI strongly recommend iwd over wpa_supplicant. It is simple, intuitive, and just works. I have been using it on my laptop for over a year with no issues.
- oftenwrong 7y agoI use and recommend this. iwd actually makes wireless easy.
- cbsmith 7y agoIt's kind of funny that it's espousing GNOME tools for command line work. ;-)
- foobarbecue 7y agoIs iwlist not the thing anymore?
- nurettin 7y agoboth iw and iwlist are still a thing. There is probably some convoluted proc path that gives a listing as well.
- majewsky 7y agoprocfs is unlikely. Scanning is not something that the kernel does by itself, a userspace application (usually wpa_supplicant) needs to perform it actively. You can see this by running e.g. sudo iw dev $IFACE scan on a system running wpa_supplicant (e.g. through NetworkManager). Every so often you'll get a "Device busy" error because wpa_supplicant is scanning already.
- kevinoid 7y agoIt is. Personally, I find the format far too verbose for casual use and have to process the output to make it concise enough: iwlist wlan0 scan | awk -F: ' BEGIN { printf "%-40s | %3s | %5s | %4s\n", "SSID", "Enc", "Qual", "Chan" } function print_network() { printf "%-40s | %3s | %5s | %4s\n", essid, key, quality, channel } /^[[:space:]]*Cell [0-9]+/ { if (key) { print_network() } } /^[[:space:]]*Channel:/ { channel=$2 } /^[[:space:]]*Encryption key:/ { key=$2 } /^[[:space:]]*ESSID:/ { essid=$2 } /^[[:space:]]*Quality=/ { match($0, /[0-9]+\/[0-9]+/) quality=substr($0, RSTART, RLENGTH) } END { print_network() }'
- deleted 7y ago[deleted]
- Proven 7y agoseriously? is that's something one can't find on any search engine when and if they need it? please post a link to installing CentOS 8, i really need that info
- hjek 7y agoI find nmtui imminently usable, for scanning and connecting, especially in Sway where nmapplet doesn't work.
- MayeulC 7y agoI agree and that's what I use most of the time, but sometimes nothing beats the simplicity of doing nmcli c my-wifi up When you know you want to connect to a Wi-Fi network you know is in range. Also, nmtui doesn't support "enterprise" Wi-Fi (PEAP, for eduroan, for instance).
- roadbeats 7y agoWhat works best for me (as a sway user): attaching a keyboard shortcut that opens / closes a floating window of nmtui.
- thomasfedb 7y agoPleasantly surprised that this is actually very simple, was psyching myself up for some horror of pipes and /dev. The output from nmcli is quite pretty to boot!
- prox 7y agowhat is the best way under Raspian Buster without installing anything?
- ghostDancer 7y agoI tend to use wicd[1] they have gtk/curses/cli versions , I've had problems with nm before. (1) https://launchpad.net/wicd https://launchpad.net/wicd
- kc0bfv 7y agoI loved wicd, and had had problems with nm. Then I had a problem with wicd - interface issues caused by the deprecation of ifconfig in favor of "ip" tools (Debian). Wicd is a set of Python scripts that call ifconfig. So I submitted a patch to fix my issue, and tied it to the multiple bug requests already reporting the issue... Wicd hasn't been updated in years though. With ifconfig starting to break (at least in some situations) it's going to need some updates soon. I switched back to nm and found it's working extremely well these days.
- nixpulvis 7y agoI use `wifi-menu` to connect to new networks. It creates the profile for me (generally just works) and everything. Otherwise, `wavemon` for general scanning.
- pnutjam 7y agoOne of the nice things about OpenSUSE is that you can use Yast from the gui or the console and it works identically. It's very nice. You can hand off configuration to Network Manager, or just configure everything in Yast's Network module.
- PappaPatat 7y agoOddly nobody here mentions horst. Quit a nice CLI package for exactly this (and a little more). From their github: horst is a small, lightweight IEEE802.11 WLAN analyzer with a text interface. Its basic function is similar to tcpdump, Wireshark or Kismet, but it's much smaller and shows different, aggregated information which is not easily available from other tools. It is made for debugging wireless LANs with a focus on getting a quick overview instead of deep packet inspection and has special features for Ad-hoc (IBSS) mode and mesh networks. It can be useful to get a quick overview of what's going on all wireless LAN channels and to identify problems. https://github.com/br101/horst https://github.com/br101/horst