Skip to content

Instantly share code, notes, and snippets.

@GlitchWitch
Last active April 22, 2024 15:10
Show Gist options
  • Save GlitchWitch/de26aa942a6eb877a3693ff3619054af to your computer and use it in GitHub Desktop.
Save GlitchWitch/de26aa942a6eb877a3693ff3619054af to your computer and use it in GitHub Desktop.
Setup the RTL8156 USB2.5G Ethernet Adapter on Ubuntu 20.04

RTL8156 USB2.5G Ethernet Adapter on Ubuntu 20.04

Download: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software

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.conf

Copy 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.rules

Install 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
@jpaodev
Copy link

jpaodev commented Mar 4, 2024

Will try that! Many thanks for the fast response and explanation - Have a nice week!:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment