我一直在尝试从命令行连接到 WPA2 wifi。我阅读了所有能找到的教程并照做了。大多数教程似乎都说了类似的东西。这是我的 wpa_supplicant 配置文件的状态。
# reading passphrase from stdin
network={
ssid="AndroidAP"
psk="xxxxxx"
psk=b87678f912341488b23729cca223c53507fd0c33620098a3187aab7ca59de057
key_mgmt=WPA-PSK
proto=RSN WPA
pairwise=CCMP TKIP
group=CCMP TKIP
}
然后,在做完常规的事情后,我到达了这一点。
root@willow-HP-Pavilion-dv6-Notebook-PC:/home/willow# /sbin/iw wlo1 link
Connected to ac:af:b9:37:d6:3e (on wlo1)
SSID: AndroidAP
freq: 2412
RX: 439571 bytes (3739 packets)
TX: 9744 bytes (51 packets)
signal: -29 dBm
tx bitrate: 13.0 MBit/s MCS 1
bss flags: short-slot-time
dtim period: 2
beacon int: 100
root@willow-HP-Pavilion-dv6-Notebook-PC:/home/willow# sudo dhclient wlo1
root@willow-HP-Pavilion-dv6-Notebook-PC:/home/willow# sudo dhclient wlo1
RTNETLINK answers: File exists
root@willow-HP-Pavilion-dv6-Notebook-PC:/home/willow# ip link show wlo1
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 8c:a9:82:4c:8c:5a brd ff:ff:ff:ff:ff:ff
root@willow-HP-Pavilion-dv6-Notebook-PC:/home/willow# ip addr show wlo1
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 8c:a9:82:4c:8c:5a brd ff:ff:ff:ff:ff:ff
inet 192.168.43.175/24 brd 192.168.43.255 scope global wlo1
valid_lft forever preferred_lft forever
inet6 fe80::8ea9:82ff:fe4c:8c5a/64 scope link
valid_lft forever preferred_lft forever
问题是浏览器无法工作。我唯一没有尝试过的方法,我读到的方法是清除系统中的网络管理器。我不想这样做,因为如果我无法让命令行工作,我怎么才能重新上线?有什么想法吗?谢谢。
////////////编辑1//////////////////////////////////////////////////////////////
以下是我尝试 ping 的结果
root@willow-HP-Pavilion-dv6-Notebook-PC:/home/willow# ping -c 10 linuxfoundation.com
ping: unknown host linuxfoundation.com
root@willow-HP-Pavilion-dv6-Notebook-PC:/home/willow#
使用命令后
sudo dhclient -r wlo1
sudo ifconfig wlo1 down
我仍然需要重新启动机器才能使网络管理器正常工作,