月满弦 發表於 2020-4-5 16:54:00

Debian 无线网卡从安装驱动到网络配置

<p>第一步增加username 的sudo权限</p>
<p>以root用户登录debian系统</p>
<p>apt install sudo</p>
<p><code>sudo apt install vim </code></p>
<p>cd /etc/</p>
<p>vim sudoers</p>
<p>找到root ALL=(ALL:ALL) ALL在下面一行添加一行</p>
<p>username ALL=(ALL:ALL) ALL</p>
<p>按esc 英文状态下输入:wq</p>
<p>保存退出文件</p>
<p>替换原版的apt源至清华大学源</p>
<pre class="highlight"><code>sudo apt install apt-transport-https ca-certificate
接下来
cd /etc/apt
sudo cp source.list source.list.bak
sudo vim source.list
输入:%d清空文件内容
输入:set mouse=c

按i 进入编辑模式

将以下内容粘贴进文件中

</code></pre>
<pre class="highlight"><code># 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free</code></pre>
<pre class="highlight"><code> 然后:wq保存退出
</code></pre>
<pre class="highlight"><code>sudo apt update</code></pre>
<pre class="highlight"><code> 安装realtek驱动
</code></pre>
<pre class="highlight"><code>
sudo apt install firmware-realtek
sudo apt install wireless-tools
sudo apt install iw
sudo apt install wpasupplicent
cd /etc/network
sudo cp interface interface.bak
ip addr</code></pre>
<pre class="highlight"><code> 安装intel驱动
</code></pre>
<pre class="highlight"><code>
sudo apt install firmware-iwlwifi
sudo apt install wireless-tools
sudo apt install iw
sudo apt install wpasupplicent
cd /etc/network
sudo cp interface interface.bak
ip addr</code></pre>
<pre class="highlight"><code> 记下无线网卡的名称:wls32
</code></pre>
<pre class="highlight"><code>sudo vim /etc/network/interface</code></pre>
<pre class="highlight"><code> 编辑 /etc/network/interface 文件,添加以下内容
</code></pre>
<pre class="highlight"><code>
#The wireless network interface allow-hotplug wls32
iface wls32 inet dhcp wpa-conf
/etc/wpa_supplicant/wpa_supplicant.conf
保存退出
chmod 0600 /etc/network/interfaces
su -l -c "wpa_passphrase your_ssid your_password &gt;
/etc/wpa_supplicant/wpa_supplicant.conf"
或者编辑
/etc/wpa_supplicant/wpa_supplicant.conf文件,添加以下内容
country=CN ctrl_interface=DIR=/var/run/wap_supplicant
GROUP=netdev
update_config=1
network={
    ssid="your_ssid"
    psk="your_password"
    } </code></pre>
<pre class="highlight"><code>
sudo ifup wls32
</code></pre><br><br>
来源:https://www.cnblogs.com/sccc/p/12637905.html
頁: [1]
查看完整版本: Debian 无线网卡从安装驱动到网络配置