Raspberry Pi WIFI access configuration

Connect to WIFI

material:

A Raspberry Pi 3B+ (with WIFI module, some previous versions do not have WIFI module), a host, and a wireless router
1. Turn on the Raspberry Pi

2. Enter the command

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Add configuration information to the file

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CN
 
network={
    
    
        ssid="你的无线网名字"  //你家WiFi的名字
        psk="密码"          //你家WiFi密码
        key_mgmt=WPA-PSK  //加密方式可以删除
}

Insert picture description here

Ctrl + o Save (after pressing it will ask whether to save in the file and press Enter at this time)

Ctrl + x to exit

3. Restart

sudo reboot

Enter the account password: pi raspberry

input the command

ifconfig

Insert picture description here

At this time the network is successful

Fixed IP address for Raspberry Pi:

input the command

sudo nano /etc/rc.local

Add ifconfig wlan0 + your own ip seen by ifconfig before exit 0 at the end of the file
Insert picture description here

Ctrl + o Save (after pressing, you will be asked whether to save in the file and press Enter at this time)
Ctrl + x to exit

4. Restart to check whether the IP is consistent with the previous setting

Guess you like

Origin blog.csdn.net/hhltaishuai/article/details/107713672