一. 无线网连接
1.1 列出所有无线网网络连接
nmcli device wifi list
实例
IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY
xx:xx:xx:xx:xx:xx simple Infra 6 195 Mbit/s 100 ▂▄▆█ WPA1 WPA2
xx:xx:xx:xx:xx:xx simple2 Infra 3 270 Mbit/s 94 ▂▄▆█ WPA1 WPA2
xx:xx:xx:xx:xx:xx -- Infra 3 270 Mbit/s 94 ▂▄▆█ WPA1 WPA2
* xx:xx:xx:xx:xx:xx 825 Infra 60 270 Mbit/s 85 ▂▄▆█ WPA1 WPA2
1.2 重现扫描无线网
nmcli device wifi rescan
1.3 连接无线网
nmcli device wifi connect SSID
其中 SSID 就是第一步中的ssid,即是无线网名称
1.4 显示无线网密码
nmcli device wifi show-password
示例
SSID: simple
安全性: WPA
密码: ********