What are the command-line alternatives to Network Manager (nm-cli), Wicd (wicd-curses), wpa_supplicant for managing wireless?
I suggest you do:
sudo vim /etc/network/interfaces
Add the wireless stanzas similar to:
auto lo
iface lo inet loopback
#auto eth0
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid <your_network>
wpa-psk <your_secret_key>
dns-nameservers 8.8.8.8 192.168.1.1
Please be certain the address is outside the pool used by the DHCP server in the router or access point. Proofread, save and close vim. Of course, substitute your details here.
On boot, the wireless should be connected at the requested address automatically.
Related videos on Youtube
George
Updated on September 18, 2022Comments
-
George over 1 year
OK, I know that I am crossing out the most popular choices out there, but there is a reason for that. I am working on a BeagleBone Black running an ultra light version of Ubuntu 13.04 and I currently have it hooked up on the router via Ethernet. I only interact with the BeagleBone through ssh and I like to keep everything on the command line (X is not even installed). Ideally I want to connect to the router wirelessly, through the USB dongle I have attached to it, but:
- The storage capacity of this microcontroller is limited, therefore the ~250MB of the network manager with its command line tools is a solution that does not "fit".
- Wicd seemed like a great alternative. wicd-curses is exactly what I am looking for: a clear and easy to use command line interface, easy to scan for networks, select yours and configure passwords, etc. However, when I try to connect to a network it crashes gloriously and I failed to solve the problem.
- wpa_supplicant does provide what I need, but "the hard way", so I want to avoid it, if possible.
Are you aware of any other application that can help me connect to my WPA wireless network through command line, without having to configure everything manually?
-
George over 10 yearsWith a combination of tools (i.e. iwconfig, iwlist and wpa_supplicant) I can make it work. However I need something more "user-friendly"
-
George over 10 yearsThat was my initial solution. However I want to avoid it for different reasons. The two main ones are: 1) I would like to select the network (potentially not knowing the exact name) from a list of available networks (I was getting that through iwlist) and 2) want to avoid saving the password in plain text
-
chili555 over 10 yearsThe password will only be readable by those with the password with: sudo chmod 600 /etc/network/interfaces.
-
George over 10 yearsActually, that would also prevent the user from adding a new interface as well. But you made me realize that I could chmod it to 622 for example and have them append the new configuration with echo <new_configuration> >> /etc/network/interfaces I guess this is the simplest solution I have for now, unless I manage to make wicd stop crashing.. Thanks for the help chili555