How To Install r8168-dkms on Kali Linux

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

Introduction

In this tutorial we learn how to install r8168-dkms on Kali Linux.

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.

There are three methods to install r8168-dkms on Kali Linux. 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 on Kali Linux first since aptitude is usually not installed by default on Kali Linux. 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 Kali Linux

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 Kali Linux, 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 Kali Linux 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

Dependencies

r8168-dkms have the following dependencies:

References

Summary

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