10

I am exploring a few low-level tools for connecting to wireless networks, and I found the following tools (with useful documentation/tutorial links):

I cannot seem to find a thorough evaluation of these tools, or of similar tools. Perhaps someone can compare these tools in terms of reliability and user-friendliness? Which one is best for a Linux desktop? A link to an existing article is welcome since I cannot find much through a web-search.

Sorry if this question is too open-ended, but I cannot find a good comparison and I have received mixed reviews from individuals about which tool is the most reliable.


Here is a bit from my experience:

I have been using wpa_cli, and I have been pretty satisfied. It works out of the box on many Linux systems, but it doesn't seem to work when NetworkManager is installed. My main problem is that I now have over 100 wifi networks in my config, and there doesn't seem to be an easy way to add/remove a network by SSID. I have to use the network number that is assigned by wpa_supplicant, and it seems unreasonable to re-number or rearrange the networks. I also have to manually enter the SSID for new networks - perhaps something like tab-completion or a text-based selection menu would be nice. This has burned lots of my time when, for example, the ssid had some trailing whitespace.

Also, I have had issues where I need to manually set a specific configuration like scan_ssid=1 for hidden networks, and key_mgmt=NONE for unencrypted networks. I am worried that some other special case may pop up when connecting to a new wifi network, and I may not have time to peruse the wpa_supplicant.conf for a solution. Thus, user-friendliness is a bit of a challenge with wpa_cli, but maybe there are features of the tool that I am not aware of.

I was advised that nmcli is the most user-friendly and does not sacrifice any reliability, even though it relies on NetworkManager as a dependency. I received another recommendation that iw is best for a Linux desktop since it is built in with all Linux distros, but my impression is that iw does not facilitate managing and automating configurations when there are lots of connections configured. The ArchWiki also says that iw only supports nl80211, but that may not be a realistic concern.

Since I cannot seem to find much comparison across these tools, any insight or references would be appreciated.

  • 2
    I think nmcli supersedes wpa_cli (so you don't need wpa_cli), but iw is a much more low level utility for controlling the wireless networks, whereas nmcli is more for end-users, as there can be GUI front ends to nmcli. – CMCDragonkai Jul 21 '16 at 7:54
3

IW

The command iw is generally used to configure the wifi devices , it can be used to connect to an open wifi network or to an access point protected by a WEP key.

The limitation : It is not possible to connect to a wifi network protected by a WPA* key.

nmcli

It is a network-manager command line tool to configure the NetworkManager and connecting to a all wifi network , it is a NetworkManger dependency . It is a powerful command line tool but you can connect without it.

wpa_cli

It is a command line tool to interact with the wpa_supplicant allowing you to write the configuration file used by wpa_supplicant (under /etc/wpa_supplicant directory) and connecting to wifi notwork (and more...).

It is a complete tool to manage your wifi connection.

but it doesn't seem to work when NetworkManager is installed.

Right , when the NetworkManager is installed it will start at boot , it will launch the wpa_supplicant.service to connect using the saved networkmanger configuration file, the wpa_cli will try to modify the wpa_supplicant configuration file and connect again which cause the command to fail.

To successfully connect through wpa_cli you should stop the NetworkManager.service.

2

Network Manager is the default manager on an Ubuntu installation, and I believe most users don't find issues with it, so I'd assume its quite reliable. Network Manager additionally has a GUI interface from which one can connect and configure network connections.

Using Network Manager would often disconnect me from large WPA2/Enterprise networks if I moved from one location to another, and require me entering my password again even after saving it into the configuration file. I found that switching to wicd solved the issue for me.

Wicd can be installed alongside the wicd-gtk package which allows easy network connection and configuration through interfacing with a GTK window. If you don't want another package to install, it can also be configured with an NCurses interface in wicd-curses. I didn't see you list wicd in your three wifi utilities above, and I'd recommend giving it a try, as I've had no bad experiences with it so far. It also handles multiple connection configurations very well in my experience.

In general, asking which program is "the best" at one thing is a difficult question to answer. Detailing your explicit needs for a program may be more helpful, as it's easier to recommend a program that meets your needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.