本文由荒原之梦原创,原文连接:http://zhaokaifeng.com/?p=692php
本文介绍了解决Debian9安装完成后没法链接wifi的问题以及一些扩展知识。网络
安装Debian9的时候就提示缺乏iwlwifi固件,可是我当时链接的是有线网络,所以跳过去该问题并无影响我安装Debian。不过,以这种方式安装完成的Debian只能使用有线网络链接互联网,没法使用无线网络。当插入一个USB无线网卡时,咱们会在网络链接页面看到“固件缺失”的提示:
图 1ide
系统:this
Linux zd 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux
网络:
有线网络(用于下载安装包)和无线网络(用于验证问题是否解决)spa
1.链接上有线网络并切换到root用户。操作系统
2.备份一下Debian9的软件源配置文件:翻译
cd /etc/apt/
cp sources.list sources.list.bak
2.打开Debian9的软件源配置文件:code
leafpad /etc/apt/sources.list
注:用leafpad打开方面复制,Debian9默认没有安装leafpad.blog
3.将non-free
添加到每一个源的后面:
修改好以后是这样的:ip
#
# deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 DVD Binary-1 20180310-11:21]/ stretch contrib main
#deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 DVD Binary-1 20180310-11:21]/ stretch contrib main
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free
deb <http://security.debian.org/debian-security stretch/updates> main contrib non-free
deb-src <http://security.debian.org/debian-security stretch/updates> main contrib non-free
# stretch-updates, previously known as 'volatile'
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free
更新系统:
apt-get update
安装firmware-iwlwifi包:
apt-get install firmware-iwlwifi
iwlwifi模块能够被自动加载,当iwlwifi被自动加载时咱们须要从新插入该模块以访问固件。
设置iwlwifi自动从新加载:
modprobe -r iwlwifi ; modprobe iwlwifi
以后咱们就能够看到wifi链接的选项了:
图 2
Debian是一个开源操做系统。所以,在安装Debian的时候,默认只安装自由软件,而非自由软件(non-free)则不会被默认安装。在Debian官方的wiki(https://wiki.debian.org/WiFi)中有关于wifi固件以及非开源的wifi驱动程序的说明,在这篇关于wifi的wiki里,有这样的描述:
”Currently there are only a few modern wifi chipsets readily available that work with free software systems. For USB wifi devices this list includes the Realtek RTL8187B chipset (802.11G) and the Atheros AR9170 chipset (802.11N). For Mini PCIe all cards with an Atheros chipset are supported.”.
翻译成中文就是:
“目前只有少数几个现代的WiFi芯片组能够与自由软件系统一块儿工做。对于USB WiFi设备,该列表包括RealTek RTL8187B芯片组(802.11g)和ActhOS AR9170芯片组(802.11n)。对于小型PCIe,全部具备AcICOS芯片组的卡都获得支持。”
也就是说并非全部计算机中的wifi固件都支持自由软件,所以Debian9默认并无启用对wifi的支持。可是 802.11n是支持自由软件的,因此咱们须要安装iwlwifi Linux kernel driver(iwlwifi内核驱动程序)来启用对Intel 802.11n devices(Intel 802.11n设备)的支持。
1.Debian Wiki: WiFi:https://wiki.debian.org/WiFi
2.Debian Wiki: iwlwifi:https://wiki.debian.org/iwlwifi
3.iwlwifi - WikiDevi:https://wikidevi.com/wiki/Iwlwifi
4.802.11n_百度百科:https://baike.baidu.com/item/802.11n