Extract the downloaded drivers
sudo tar -xvjf r8152.53.56-2.15.0.tar.bz2 -C /usr/src/Create a DKMS.conf file
sudo echo -e 'PACKAGE_NAME="r8152"\nPACKAGE_VERSION="2.15.0"\nBUILT_MODULE_NAME[0]="$PACKAGE_NAME"\nDEST_MODULE_LOCATION[0]="/updates/dkms"\nAUTOINSTALL="YES"\nREMAKE_INITRD="YES"' > /usr/src/r8152-2.15.0/dkms.confCopy the .rules file to /usr/lib/udev/rules.d
sudo cp /usr/src/r8152-2.15.0/50-usb-realtek-net.rules /usr/lib/udev/rules.d/50-usb-realtek-net.rulesInstall and load the driver
sudo dkms add -m r8152 -v 2.15.0
sudo dkms build -m r8152 -v 2.15.0
sudo dkms install -m r8152 -v 2.15.0
sudo depmod -a
sudo modprobe r8152
For the latest version (
2.20.1at time of writing), download from here:https://www.realtek.com/Download/ToDownload?type=direct&downloadid=3375RTL8156 USB2.5G Ethernet Adapter on Ubuntu 20.04
1. Extract the downloaded drivers
Tip
If you get an error stating
tar (child): bzip2: Cannot exec: No such file or directory, you need to installbzip2with:sudo apt update && sudo apt install bzip2 -y2. Create a DKMS.conf file
3. Copy the .rules file to
/usr/lib/udev/rules.d4. Install and load the driver