解决树莓派 no wireless interfaces found问题
前两天做树莓派的ip固定的时候发现设置了eth0的static ip后直接找不到无线网卡,最后找到下面的解决方法
root@raspberrypi:/etc/network# cat 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 eth0
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
将interfaces文件修改为上面所示即可。
linux网络配置补充
网络出了几次问题了,今天正式的看了一下linux的网络配置。
- /etc/host.conf 配置域名服务客户端的控制文件
- /etc/hosts 配置主机名和IP地址的映射
- /etc/resolv.conf 域名服务客户端的配置文件,指定域名服务器的IP地址
- /etc/network/interfaces 用于设置网络配置信息(IP地址,子网掩码,网关IP等)
- /etc/udev/rules.d/70-persistent-net.rules 记录主机中所有网卡的MAC地址
- /etc/xinetd.conf 定义了由进程守护程序xinetd所守护的网络服务
- /etc/networks 实现域名与网络地址的映射
- /etc/protocols 设定主机使用的协议及各个协议的协议号(协议ID)
- /etc/services 设定主机上各个网络服务进程所使用的端口号
这里网络配置文件重点注意一下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 eth0
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
auto eth0
iface eth0 inet dhcp
auto eth0
iface eth0 inet static
address 10.10.3.150
netmask 255.255.255.0
gateway 10.10.3.1
#pre-up ifconfigeth0 hw ether 11:22:33:44:55:66 # 手动设定MAC地址