Using an 18-month old openSUSE with nmcli -v 0.8.2, I did the following:
nmcli dev wifi
That gave me a list, in which I could spot my own wireless hub. The key columns are SSID and BSSID.
I then used Start Menu-->Control Center-->Network Connections-->Wireless. I had one connection there called "Wireless connection 1". Selecting it, Edit...-->Wireless: fill in SSID and BSSID verbatim from the nmcli command above. Then on Wireless Security page, I entered my hub's password. The "Security" selection was based again on the nmcli output above. OK, Save...
Then (I did this as root; may not be necessary):
nmcli con up id 'Wireless connection 1'
Note the "id" is NOT the SSID or BSSID; instead this is the "nickname" on your computer for this network.
As stated above, /etc/NetworkManager/system-connections holds files of which "Wireless connection 1' is one (in my case).
dev wlan0
instead. – Flup Jun 20 '13 at 11:57Error: 'dev' command 'wlan0' is not valid.
– easl Jun 20 '13 at 11:59nmcli con up id dlink_home
but it only works after I start GUI withstartx
, without starting GUInmcli nm
's state is disabled. – easl Jun 20 '13 at 12:00