How To Install driverctl on CentOS 8

driverctl is Device driver control utility

Introduction

In this tutorial we learn how to install driverctl on CentOS 8.

What is driverctl

driverctl is a tool for manipulating and inspecting the system device driver choices. Devices are normally assigned to their sole designated kernel driver by default. However in some situations it may be desireable to override that default, for example to try an older driver to work around a regression in a driver or to try an experimental alternative driver. Another common use-case is pass-through drivers and driver stubs to allow userspace to drive the device, such as in case of virtualization. driverctl integrates with udev to support overriding driver selection for both cold- and hotplugged devices from the moment of discovery, but can also change already assigned drivers, assuming they are not in use by the system. The driver overrides created by driverctl are persistent across system reboots by default.

We can use yum or dnf to install driverctl on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install driverctl.

Install driverctl on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install driverctl using dnf by running the following command:

sudo dnf -y install driverctl

Install driverctl on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install driverctl using yum by running the following command:

sudo yum -y install driverctl

How To Uninstall driverctl on CentOS 8

To uninstall only the driverctl package we can use the following command:

sudo dnf remove driverctl

driverctl Package Contents on CentOS 8

/etc/driverctl.d
/usr/lib/systemd/system/[email protected]
/usr/lib/udev/rules.d/05-driverctl.rules
/usr/lib/udev/rules.d/89-vfio-uio.rules
/usr/lib/udev/vfio_name
/usr/sbin/driverctl
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/driverctl
/usr/share/doc/driverctl
/usr/share/doc/driverctl/README
/usr/share/doc/driverctl/TODO
/usr/share/licenses/driverctl
/usr/share/licenses/driverctl/COPYING
/usr/share/man/man8/driverctl.8.gz

References

Summary

In this tutorial we learn how to install driverctl on CentOS 8 using yum and dnf.