Para ativar o Wi-Fi
sudo rfkill unblock wifi
nmcli nm wifi on
Para listar redes WiFi
nmcli c show
O resultado deve ser algo como isto
NAME UUID TYPE TIMESTAMP-REAL
Rishbh-Q1000 cd79a7a1-1cf4-49c3-ad58-21ab17d1ba05 802-11-wireless Thursday 18 September 2014 05:32:34 PM IST
ncmli
permite que você se conecte por meio do UUID ou do ID (NAME)
Uso:
nmcli connection { COMMAND | help }
COMMAND := { list | status | up | down | delete }
list [id <id> | uuid <id>]
status [id <id> | uuid <id> | path <path>]
up id <id> | uuid <id> [iface <iface>] [ap <BSSID>] [--nowait] [--timeout <timeout>]
down id <id> | uuid <id>
delete id <id> | uuid <id>
Exemplo de uso neste caso
-
Conectar:
nmcli c up uuid cd79a7a1-1cf4-49c3-ad58-21ab17d1ba05
ou
nmcli c up id Rishbh-Q1000
-
Conecte-se à interface wlan específica:
nmcli c up id Rishbh-Q1000 iface wlan1
ou
nmcli c up uuid cd79a7a1-1cf4-49c3-ad58-21ab17d1ba05 iface wlan1
-
Desconectar:
nmcli c down id Rishbh-Q1000
ou
nmcli c down uuid cd79a7a1-1cf4-49c3-ad58-21ab17d1ba05