How To Install driverctl on Ubuntu 22.04
Introduction
In this tutorial we learn how to install driverctl on Ubuntu 22.04.
What is driverctl
driverctl is:
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 desirable 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.
There are three methods to install driverctl on Ubuntu 22.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 driverctl Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install driverctl using apt-get by running the following command:
sudo apt-get -y install driverctl
Install driverctl Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install driverctl using apt by running the following command:
sudo apt -y install driverctl
Install driverctl 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 driverctl using aptitude by running the following command:
sudo aptitude -y install driverctl
How To Uninstall driverctl on Ubuntu 22.04
To uninstall only the driverctl package we can use the following command:
sudo apt-get remove driverctl
Uninstall driverctl And Its Dependencies
To uninstall driverctl and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:
sudo apt-get -y autoremove driverctl
Remove driverctl Configurations and Data
To remove driverctl configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge driverctl
Remove driverctl configuration, data, and all of its dependencies
We can use the following command to remove driverctl configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge driverctl
References
Summary
In this tutorial we learn how to install driverctl package on Ubuntu 22.04 using different package management tools: apt, apt-get and aptitude.