Raspberry Pi without desktop configuration WiFi connection

To configure WiFi connection in the Raspberry Pi desktop-less environment, we can do this by editing the following files:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

In the file you can add the following to configure your WiFi network:

country=china
ctrl_interface=/var/run/wpa_supplicant
update_config=1

network={
    
    
    ssid="Wifi_SSID"
    psk="Wifi_Password"
}
  • Replace Wifi_SSIDwith the actual network name
  • will be Wifi_Passwordreplaced with the actual WiFi password

After the modification is completed, save and exit the file, and restart the network service to make it effective immediately.

sudo systemctl restart networking

You can also restart the system directly

sudo reboot

The Raspberry Pi will connect to the WiFi network using the configuration you provide. Please make sure your WiFi network name and password are correct and that the Pi and WiFi router are close enough to get good signal strength.

Guess you like

Origin blog.csdn.net/no1xium/article/details/133025430