Page 1 of 1

How to install the RTL815x USB Ethernet drivers on Linux (Debian/Ubuntu based)

Posted: 20 Dec 2025, 12:19
by the_r3dacted
It was impossible for me to find any guide on how to install the drivers. The readme did not tell me how, nor could I find much searching. Until after searching a ton, I finally found something to go off of in an issue report.

To install the drivers, get them from Realtek, https://www.realtek.com/Download/List?cate_id=585 the "USB NIC Linux driver for kernel up to *"
Extract the drivers, open the extracted driver directory up in a terminal, and run these commands.

Code: Select all

sudo make
sudo make modules
sudo make install
sudo depmod -a
sudo update-initramfs -u

sudo make install
sudo depmod -a
sudo update-initramfs -u

reboot
`sudo make` compiles the driver, r8152.ko, `sudo make modules` compiles the kernel module for the driver (I think, I don't know what it does tbh), and `sudo make install` installs the driver. However for me I encountered an error, and also had to run `sudo depmod -a` and `sudo update-initramfs -u` to make it work. Don't know what they do really, but they make it work. Now running `sudo make install` again no longer has an error. The readme says to run the depmod and update-initramfs commands after installing the driver, so I run the commands again to be safe, and then I reboot. Now the driver works, at least for me in my setup, I don't know if it will work for you, Linux is weird and incompatible at the best of times.

You can check if the driver is being used, the network manager, at least for me, shows the driver in use for the network adapter. It should also show 5Gbps or anything other than the 800ish or so Mbps that it shows without the correct driver. You can also check the version with `modinfo r8152` in a terminal.

For each new kernel upgrade you make, you will need to repeat this process, if you update often, you will need to repeat this often. I don't know how or if this can be automated, Linux is weird and incompatible at the best of times.

For SEO purposes, I'm going to have to mention all applicable adapters here, as I suspect someone like me searching this will search `(adapter they have) Linux driver install guide` and not specifically for the rtl8152 or r8152, the name of the driver, which corresponds to a 10/100 adapter. RTL8152B RTL8153 RTL8153B RTL8153C RTL8153D RTL8153E RTL8154 RTL8154B RTL8156 RTL8156B RTL8156BG RTL8156G RTL8157 RTL8159