How To Install r8168-dkms on Ubuntu 20.04

In this tutorial we learn how to install r8168-dkms on Ubuntu 20.04. r8168-dkms is dkms source for the r8168 network driver dkms source for the r8168 network driver

Introduction

In this tutorial we learn how to install r8168-dkms on Ubuntu 20.04.

What is r8168-dkms

r8168-dkms is:

r8168 is the Linux device driver released by RealTek for their network controllers with PCI-Express interface:

  • 10/100/1000M Gigabit Ethernet: RTL8111B, RTL8111C, RTL8111D, RTL8111E, RTL8111F, RTL8111G(S), RTL8111H(S), RTL8118(A)(S), RTL8119i, RTL8111L, RTL8168B, RTL8168E, RTL8168H, RTL8111DP, RTL8111EP, RTL8111FP, RTL8411, RTL8411B

This driver should only be used for devices not yet supported by the in-kernel driver r8169. Please see the README.Debian for instructions how to report bugs against r8169 that made it necessary to use r8168-dkms.

Installation of the r8168-dkms package will disable the in-kernel r8169 module. To re-enable r8169, the r8168-dkms package must be purged.

This package provides the dkms source code for the r8168 kernel modules. Kernel source or headers are required to compile these modules.

Package: r8168-dkms Architecture: all Version: 8.048.00-1 Priority: extra Section: universe/kernel Source: r8168 Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Andreas Beckmann [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1354 Depends: dkms (>= 2.1.0.0) Filename: pool/universe/r/r8168/r8168-dkms_8.048.00-1_all.deb Size: 98652 MD5sum: 60ab2944b687b27fcde165c83578d6a1 SHA1: afce84797352f5341d3bef29e595d3ceb747266a SHA256: 0c3abfe96e483afc48daf3e27b03093b139f6620e3e119c3a8e080b18941281f Homepage: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software Description-en: dkms source for the r8168 network driver r8168 is the Linux device driver released by RealTek for their network controllers with PCI-Express interface:

  • 10/100/1000M Gigabit Ethernet: RTL8111B, RTL8111C, RTL8111D, RTL8111E, RTL8111F, RTL8111G(S), RTL8111H(S), RTL8118(A)(S), RTL8119i, RTL8111L, RTL8168B, RTL8168E, RTL8168H, RTL8111DP, RTL8111EP, RTL8111FP, RTL8411, RTL8411B

This driver should only be used for devices not yet supported by the in-kernel driver r8169. Please see the README.Debian for instructions how to report bugs against r8169 that made it necessary to use r8168-dkms.

Installation of the r8168-dkms package will disable the in-kernel r8169 module. To re-enable r8169, the r8168-dkms package must be purged.

This package provides the dkms source code for the r8168 kernel modules. Kernel source or headers are required to compile these modules.

There are three methods to install r8168-dkms on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install r8168-dkms Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install r8168-dkms using apt-get by running the following command:

sudo apt-get -y install r8168-dkms

Install r8168-dkms Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install r8168-dkms using apt by running the following command:

sudo apt -y install r8168-dkms

Install r8168-dkms Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install r8168-dkms using aptitude by running the following command:

sudo aptitude -y install r8168-dkms

How To Uninstall r8168-dkms on Ubuntu 20.04

To uninstall only the r8168-dkms package we can use the following command:

sudo apt-get remove r8168-dkms

Uninstall r8168-dkms And Its Dependencies

To uninstall r8168-dkms and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove r8168-dkms

Remove r8168-dkms Configurations and Data

To remove r8168-dkms configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge r8168-dkms

Remove r8168-dkms configuration, data, and all of its dependencies

We can use the following command to remove r8168-dkms configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge r8168-dkms

References

Summary

In this tutorial we learn how to install r8168-dkms package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.