Intro

How to set up a Realtek 802.11ac (RTL8812AU) Wi-Fi adapter on Linux

Identify the Adapter

  • Check which Realtek chipset is in use
lsusb
Bus 001 Device 002: ID 0bda:a811 Realtek Semiconductor Corp. RTL8188CAU 802.11a/b/g/n/ac WLAN Adapter

Note: The USB ID (0bda:a811) is useful for finding the correct driver.



Install Driver (Linux)

For kernel version > 5 1

  • Install required tools
# Update package lists for the latest versions
sudo apt update
# Install essential build tools and Git for compiling drivers
sudo apt install -y git build-essential
  • Clone the rtl8812au repo and build the module
# Clone driver repo
git clone https://github.com/gnab/rtl8812au.git
cd ./rtl8812au
# Build module
make
# Load the module temporarily (until reboot)
sudo insmod 8812au.ko 
  • Install the driver
# Copy the module to kernel drivers directory
sudo cp 8812au.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless
sudo depmod

Why DKMS (Dynamic Kernel Module Support)?

DKMS automatically rebuilds the driver whenever the Linux kernel is updated.
This ensures your Wi-Fi adapter keeps working after kernel upgrades without manual recompilation.

  • Set up DKMS
# Install DKMS (if not already installed)
sudo apt install dkms
 
# Add the driver to DKMS and build it for your current kernel
sudo make dkms_install
 
# Remove the driver from DKMS (if needed)
sudo make dkms_remove

Footnotes

  1. https://askubuntu.com/questions/1056291/driver-rtl8811au-for-usb-wifi ↩