flybywire
flybywire

Reputation: 274130

ubuntu: manipulating wireless networking

Is there an API (or command line) in Ubuntu to see the available wireless networks, their strength, etc, and connecting to one?

Upvotes: -1

Views: 1414

Answers (6)

Lukeus_Maximus
Lukeus_Maximus

Reputation: 513

The command line utility nmtui provides an in-terminal graphical interface to connect to wireless networks, see their strength, and connect to them.

Upvotes: 0

Jonas Kölker
Jonas Kölker

Reputation: 7837

Ubuntu tends to harness the "Awesome Power(TM) of Undocumented Frameworks(TM), Undocumented Object Brokerage Buses(TM) and Undocumented Abstraction Layers(TM)". But fortunately there is Community Support, where you can go on IRC and talk to all the other people who just like you have read the undocumentation.

Go with ifconfig, iwconfig, iwlist and wpa_supplicant if you want something that has documentation that tells you how it works. Or, you can just run it once, look at the output and figure out how to write a shell script which does what you want.

I'm not bitter. Not at all. Why do you say that? :D

(Truth be told, NetworkManager doesn't make iw{config,list} lie, but don't count on nm not overriding the settings you use them to ask for.)

Upvotes: 0

bbaja42
bbaja42

Reputation: 2169

for command line; scanning can be done with iwlist (try man iwlist more more help)

iwlist wlan0 scan

wlan0 is name of wireless interface in my case

for gui part, i prefer wicd; easy to use, support wep,wpa,wpa2

Upvotes: 0

ctuffli
ctuffli

Reputation: 3580

Linux supports something called Wireless Extensions that defines a common interface to different wireless cards. The extensions define a set of IOCTL calls and netlink events used to configure devices as well as get information about detected events (e.g. disconnecting from an access point).

An example of applications which use the wireless extensions include Wireless Tools for Linux (iwconfig, iwlist, etc.) and the wpa_supplicant.

Note that not all devices support the wireless extensions, so you may need to work with proprietary interfaces such as MadWiFi.

Upvotes: 1

M_D_K
M_D_K

Reputation: 346

ifconfig and iwconfig are used to control network connections. Your wifi adapter may also have specific apps for creating the initial network device, this is the case with madwifi which will create an athX(x is numeric) device which can be controlled be ifconfig and iwconfig. It should also be mentioned that the restricted hardware driver application that comes with Ubuntu is pretty good at installing and setting up drivers for wifi.

Ubuntu depending on the variant comes with network managers, for KDE its the knetworkmanager and gnome is gnome-netstatus-applet.

By default these apps are started depending on variant.

Upvotes: 1

jrgc
jrgc

Reputation: 150

network-manager has a dbus service. You can use any language with dbus binding to talk to it.

Upvotes: 4

Related Questions