Download driver
mkdir -p ~/build
cd ~/build
git clone https://github.com/brektrou/rtl8821CU.git
Ps. A connection failure error will be reported. Just execute the above statement a few times and it will be fine.
Install the compilation tool gcc
sudo apt update
sudo apt install build-essential
Build and install
cd rtl8821CU
make
sudo make install
Check if the driver is installed
ls /lib/modules/$(uname -r)/kernel/drivers/net/wireless/realtek/rtl8821cu
#If the following appears, the installation is successful
8821cu.ko
lsusb
#The list will appear
Bus 001 Device 006: ID 0bda:1a2b Realtek Semiconductor Corp.
Ps. I did not see the above when I used this command This, but using the following command will work.
Start the driver
sudo usb_modeswitch -KW -v 0bda -p 1a2b
or
sudo modprobe 8821cu
If the statement reports an error, reboot into the bios, turn off the secure boot option and re-execute the statement.
Automatically start the driver
sudo gedit /lib/udev/rules.d/40-usb_modeswitch.rules
Append LABEL="modeswitch_rules_end"the following before the end line:
# Realtek 8211CU Wifi AC USB
ATTR{idVendor}=="0bda", ATTR{idProduct}=="1a2b", RUN+="/usr/sbin/usb_modeswitch -K -v 0bda -p 1a2b"
If the above method does not work, try using the method in reference [3].
Reference materials
[1] How to use Tenda U9 wireless network card under ubuntu16.04
[ 2]Ubuntu installs Tenda U9 network card driver
[3] Ubuntu 20.04 configures TP-WDN5200H wireless network card< /span>