其他分享
首页 > 其他分享> > 树莓派断电之后再次上电无法连接到WiFi

树莓派断电之后再次上电无法连接到WiFi

作者:互联网

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

在wpa_supplicant.conf文件中添加:


country=CN
  
ctrl_interface=DIR= /var/run/wpa_supplicant GROUP=netdev

update_config=1

network={

      ssid="WiFi名称"

      psk="WiFi密码"

      key_mgmt=WPA-PSK

      priority=1

}



cd /etc/network

sudo nano /etc/network/interfaces

在文件的末尾添加

auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "WiFi名称"
wpa-psk "WiFi密码"
sudo reboot

 

标签:树莓,sudo,上电,WiFi,iface,conf,supplicant,wpa
来源: https://blog.csdn.net/qq_44045338/article/details/107022772