解决树莓派 no wireless interfaces found问题

解决树莓派 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地址
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值