So you just purchased one of those 802.11ac USB WiFi cards but it’s not working on Linux. Not to worry, I’ve compiled a list of steps to get it working on your Fedora or Debian based distribution. If you’re on Arch Linux or a derivative, the steps will be similar but you’ll have to use pacman
to make sure you have the right dependencies.
For Fedora and RPM-esque distributions
Fedora was a bit tricky so you need to make sure you update your system and ensure you have kernel-devel
installed. I have the steps for you below
# Ensure your system is up-to-date
sudo dnf update
# If there are new kernel updates, please restart. Once done, install the kernel-devel and dkms package
sudo dnf install kernel-devel kernel-devel-debug dkms
# Once done, you can proceed with the following one-liner
cd /tmp && git clone https://github.com/brektrou/rtl8821CU.git && cd rtl8821CU && chmod +x dkms-install.sh
# Now you can install the dkms script
sudo ./dkms-install.sh
# If all goes well, you can now run the modprobe command
sudo modprobe 8821cu
For Ubuntu and Debian-esque distributions
Very similar to Fedora, we’re just going to use apt
to install a few packages.
# Ensure your system is up-to-date
sudo apt update && sudo apt upgrade
# If there are new kernel updates, please restart. Once done, install the build-essential git and dkms packages.
sudo apt install build-essential git dkms
# Once done, you can proceed with the following one-liner
cd /tmp && git clone https://github.com/brektrou/rtl8821CU.git && cd rtl8821CU && chmod +x dkms-install.sh
# Now you can install the dkms script
sudo ./dkms-install.sh
# If all goes well, you can now run the modprobe command
sudo modprobe 8821cu
If you run into any issues, feel free to let me know.
Thanks for reading.
AlexFinns
May 21, 2022 — 3:58 pm
Hi, when I try the last command (sudo modprobe 8821cu) it gives me a fatal error. The error is “modprobe: FATAL: Module 8821cu not found in directory /lib/modules/5.16.0-kali7-amd64”. It seems as if it doesn’t recognize my NIC. However, when I do lsusb it comes up. How do I fix this problem? Thanks in advance! Alex.
Jibun no Kage
November 22, 2022 — 1:48 pm
There are much newer drivers on github for the adapter now. The driver you reference is many years old now.
admin
December 12, 2022 — 10:24 pm
I’m sure there are! I haven’t updated the guide as I no longer use these devices so I haven’t had to interact with these as of yet. But if you feel that this can be updated with a new command/script, feel free to let me know!
Mike
January 21, 2023 — 11:41 am
like where
Wolfgang Babanek
December 12, 2022 — 9:34 pm
Hello Berk,
You actually seem to be a good programmer. Your guide to the 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC worked immediately!!!!!
Thank you for your work!
Before that I had at least 8 failures with other suggestions. I will publish your solution in ubuntuusers.de. The stick obviously causes many problems.
Thanks again and keep up the good work
Wolfgang (Germany)
Original
Hallo Berk,
Du scheinst tatsächlich ein guter Programmierer zu sein. Deine Anleitung für den 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC hat sofort funktioniert!!!!!
Vielen Dank für Deine Arbeit!
Vorher hatte ich mindestens 8 Misserfolge mit anderen Vorschlägen. Ich werde Deine Lösung in ubuntuusers.de veröffentlichen. Der Stick macht offenbar vielen Probleme.
Nochmal vielen Dank und weiterhin Erfolg
Wolfgang (Deutschland)
admin
December 12, 2022 — 10:25 pm
Hi Wolfgang!
No problem, glad to hear it solved your issue! 🙂
Richard
December 17, 2022 — 7:44 pm
Thank you, very helpful!
admin
December 21, 2022 — 9:23 am
Glad you found it helpful!
Eddy Bock
December 22, 2022 — 7:18 am
Very good instructions. My compliments. Thanks a lot 🙂
Eddy
Berk D.
January 3, 2023 — 9:30 pm
No problem Eddy 🙂
Maxime
January 5, 2023 — 11:29 am
It took me 30min to build the driver, but it works fine on a Raspberry Pi 2B ! Thanks !
Guilherme Gouveia da Costa
February 1, 2023 — 10:12 pm
Thank you so much.
simple instructions. 100% workfull.
Cal
March 8, 2023 — 7:11 am
Worked like a charm. Thank you!
Ivan
April 27, 2023 — 8:25 pm
Excellent guide working 100 percent on the first try
Ryan Huam
June 26, 2023 — 2:42 pm
I got this error:
Building module:
cleaning build area…
‘make’ KVER=5.19.0-45-generic………………(bad exit status: 2)
ERROR (dkms apport): binary package for rtl8821CU: 5.4.1 not found
Error! Bad return status for module build on kernel: 5.19.0-45-generic (x86_64)
Consult /var/lib/dkms/rtl8821CU/5.4.1/build/make.log for more information.
Finished running dkms install steps.
And after that the last command output this:
modprobe: FATAL: Module 8821cu not found in directory /lib/modules/5.19.0-45-generic
Ulisse
July 13, 2023 — 10:03 am
Thank you very much for the detailed instructions.
I managed to install everything perfectly on LinuxMint 21.1 xfce4 on a Intel Core 2 Duo E8400 (2)!
Adrian Fox
August 4, 2023 — 11:27 am
Wonderful! You are indeed a life saver. I bought a cheap little Chinese USB wifi dongle for 10 euros, but despite a lot of messing with their CD files and downloading them from the Internet, nothing worked as claimed in their little manual. Using the Linux option I managed to find a setup file which when implemented at the terminal seemed to do nothing.
I did at least identify the chip with lsusb and this enabled me to find your wonderful page about installing the necessary. Your instructions are so clear and well written and it worked like a dream, with the Wifi network showing up immediately after doing what you say in the Ubuntu/Debian scripts (I am on Linux Mint 21.1)
This now gives me the flexibility to move the desktop away from the cable connection and into another room or location.
If I could give you a medal, I would!