之前一直用小米的驱动,但是感觉太慢了,所以还是决定使用有线连接。

但是之前进入Linux系统后,有线连接没有,所以需要安装驱动。

01 查询网卡类型(Windows)

进入windows系统,进入CMD命令行,输入systeminfo
查询网卡类型

网卡:             安装了 2 个 NIC。                                                                                                       
[01]: Realtek PCIe 2.5GbE Family Controller                                                                                 
连接名:      以太网 2                                                                                                   
启用 DHCP:   是                                                                                                         
DHCP 服务器: 10.193.0.1                                                                                                 
IP 地址                                                                                                                   
[01]: 10.193.194.9                                                                                                      
[02]: fe80::9b6:1e28:e575:69cd                                                                                          
[03]: 2001:da8:1002:8040::2:939c                                                                                  
[02]: Xiaomi 802.11n USB Wireless Adapter                                                                                   
连接名:      WLAN 2                                                                                                     
状态:        媒体连接已中断 

02 查询网卡驱动(Ubuntu)

在 Ubuntu打开终端,输入lspci -v 查看网卡驱动

如果末尾显示:Kernel driver in use:r8169

说明驱动版本不符,需要重新安装驱动,要安装RTL8125

选择安装RTL8125,是根据windows查询到的网卡类型选择的

查询结果如下:

guyue@guyue:~$ lspci -v
00:00.0 Host bridge: Intel Corporation Device 9b53 (rev 03)
	Subsystem: ASUSTeK Computer Inc. Device 8694
	Flags: bus master, fast devsel, latency 0
	Capabilities: <access denied>

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 03) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 120
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: 00004000-00004fff
	Memory behind bridge: 91000000-920fffff
	Prefetchable memory behind bridge: 00000000a0000000-00000000b1ffffff
	Capabilities: <access denied>
	Kernel driver in use: pcieport

00:14.0 USB controller: Intel Corporation Device a3af (prog-if 30 [XHCI])
	Subsystem: ASUSTeK Computer Inc. Device 8694
	Flags: bus master, medium devsel, latency 0