How To Install dh-modaliases on Ubuntu 18.04

In this tutorial we learn how to install dh-modaliases on Ubuntu 18.04. dh-modaliases is debhelper extension for scanning kernel module aliases

Introduction

In this tutorial we learn how to install dh-modaliases on Ubuntu 18.04.

What is dh-modaliases

dh-modaliases is:

dh_modaliases is useful for packages that ship third-party kernel modules, either in binary form, or as sources (with e. g. DKMS). It extracts the modules’ modaliases from either the compile .ko files themselves (for packages which ship them in compiled form, using modinfo), or from a package file debian/packagename.modaliases.

This enables software which is looking for missing driver packages (such as Jockey or the operating system installer) to identify which package(s) will provide a driver for a piece of hardware, identified by its modalias.

There are three methods to install dh-modaliases on Ubuntu 18.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 dh-modaliases Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install dh-modaliases

Install dh-modaliases Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install dh-modaliases

Install dh-modaliases 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 dh-modaliases using aptitude by running the following command:

sudo aptitude -y install dh-modaliases

How To Uninstall dh-modaliases on Ubuntu 18.04

To uninstall only the dh-modaliases package we can use the following command:

sudo apt-get remove dh-modaliases

Uninstall dh-modaliases And Its Dependencies

To uninstall dh-modaliases and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove dh-modaliases

Remove dh-modaliases Configurations and Data

To remove dh-modaliases configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge dh-modaliases

Remove dh-modaliases configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge dh-modaliases

References

Summary

In this tutorial we learn how to install dh-modaliases package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.