我运行以下命令来添加到网络管理器的新连接:
nmcli con add con-name MIDVERCORP ifname wlan0 type wifi ssid "MIDVERCORP"
当我查看配置的连接时,已添加此新连接,但接口/设备未设置为wlan0
。
# nmcli con
NAME UUID TYPE DEVICE
eth0 1c71a54a-5ef1-4e32-ad02-8427f0168645 ethernet eth0
eth1 57ce5d30-cde3-4b07-b83f-a5935f93cb6a ethernet eth1
MIDVERCORP 48e53a8a-ccbb-461e-bdca-74a837aa2c98 wifi --
Wired connection 1 0eabbb3d-40d4-3031-a46e-14d87f9ac275 ethernet --
Wired connection 2 fc12cba9-ee87-377d-ac4e-746a2f8fd6b3 ethernet --
static-usb0 f93578c1-d309-4103-8554-fc1982ccda02 ethernet --
# ip link show wlan0
5: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
link/ether c0:ee:40:50:25:c0 brd ff:ff:ff:ff:ff:ff
为了为此连接设置 wlan0 接口,我缺少什么?
编辑
要进一步显示 wifi 已启用:
# nm radio wifi on
# nm radio
WIFI-HW WIFI WWAN-HW WWAN
enabled enabled enabled enabled
# nm dev wifi rescan
Error: Scanning not allowed while unavailable or activating.
# ip link show wlan0
6: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
link/ether c0:ee:40:50:25:c0 brd ff:ff:ff:ff:ff:ff
# ip addr show wlan0
6: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether c0:ee:40:50:25:c0 brd ff:ff:ff:ff:ff:ff
答案1
我的问题是 wpa_supplicant 没有运行。
systemctl start wpa_supplicant
然后我就可以运行nmcli dev wifi rescan; nmcli dev wifi list
并查看可用的 AP。