树莓派网络配置记录

/etc/network/interfaces文件
这里配置的是无线网,如果全删除就连不上网,无论无线还是有线

# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo                                                 //自动获取
iface lo inet loopback                                  //本地回环
iface eth0 inet manual                                  //设置eth0的状态遵循手册
allow-hotplug wlan0                                     //允许-热插拔 wlan0
iface wlan0 inet manual                                 //设置wlan0为状态遵循手册
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf    //wpa协议文件的位置
allow-hotplug wlan1                                     //允许-热插拔 wlan1
iface wlan1 inet manual                                 //设置wlan1为状态遵循手册
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf    //wpa协议文件的位置

首先查看了一下我的电脑PC网络
IP地址是10.22.168.7
掩码是255.255.252.0 注意这里确定主机号是21
网管是xxxx
在这里插入图片描述

接下来配置树莓派中的文件

发布了97 篇原创文章 · 获赞 18 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_32460819/article/details/102136656