thinkpad E470 安装ubuntu16 没有显示wifi

注: 按照下面介绍的方法,装完了网卡驱动,但是wifi连接时好时坏,无意中配置了/etc/network/interfaces文件,居然解决了问题:

root@controller:/etc/network# ifconfig -a
enp4s0: flags=4099  mtu 1500
        ether 54:e1:ad:a2:bc:e5  txqueuelen 1000  (以太网)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 1000  (本地环回)
        RX packets 119  bytes 8790 (8.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 119  bytes 8790 (8.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp5s0: flags=4163  mtu 1500
        inet 192.168.43.213  netmask 255.255.255.0  broadcast 192.168.43.255
        inet6 240e:82:f080:d6de:461e:7d90:de6d:cd12  prefixlen 64  scopeid 0x0
        inet6 fe80::48b:540a:92e1:8dec  prefixlen 64  scopeid 0x20
        ether 60:14:b3:b8:55:4b  txqueuelen 1000  (以太网)
        RX packets 5281  bytes 3281514 (3.2 MB)
        RX errors 0  dropped 126  overruns 0  frame 0
        TX packets 6430  bytes 957308 (957.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


##原先的配置 (连接wifi时好时坏)
root@controller:/etc/network# cat interfaces.back
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
iface wlp5s0 inet dhcp

##现在的配置 (正常连接wifi)
root@controller:/etc/network# cat interfaces
bridge_ports wlp5s0  # 网卡名称,网桥创建前连接外部的网卡,可通过ifconfig命令查看,有IP地址的就是
bridge_stp on  # 避免数据链路出现死循环
bridge_fd 0  # 将转发延迟设置为0

方法1: 直接安装ubuntu提供的驱动包

[无线网卡驱动deb包-ubuntu官网提供: https://packages.ubuntu.com/uk/xenial-updates/amd64/bcmwl-kernel-source/download]

方法2:编译安装第三方的驱动包

1, 下载驱动包

以太网的r8168的驱动:链接:https://pan.baidu.com/s/1dGZC70d 密码:cwsx

2,解压zip文件, 修改Makefile文件

root@wang-pc:~/wireless/aa# ls
rtl8821ce  rtl8821ce.zip

root@wang-pc:~/wireless/aa# cd rtl8821ce
root@wang-pc:~/wireless/aa/rtl8821ce# ls
8821ce.ko     8821ce.mod.o  clean  hal          include  Makefile       Module.symvers  platform     runwpa
8821ce.mod.c  8821ce.o      core   ifcfg-wlan0  Kconfig  modules.order  os_dep          rtl8821c.mk  wlan0dhcp

root@wang-pc:~/wireless/aa/rtl8821ce# pwd
/root/wireless/aa/rtl8821ce

export 改为实际解压目录
在这里插入图片描述

3, 编译,安装

make &&  sudo make install
sudo modprobe -a 8821ce
reboot

你可能感兴趣的:(linux系统)