How To Install haveged on Ubuntu 22.04

In this tutorial we learn how to install haveged on Ubuntu 22.04. haveged is Linux entropy source using the HAVEGE algorithm

Introduction

In this tutorial we learn how to install haveged on Ubuntu 22.04.

What is haveged

haveged is:

haveged is a userspace entropy daemon which is not dependent upon the standard mechanisms for harvesting randomness for the system entropy pool. This is important in systems with high entropy needs or limited user interaction (e.g. headless servers).

haveged uses HAVEGE (HArdware Volatile Entropy Gathering and Expansion) to maintain a 1M pool of random bytes used to fill /dev/random whenever the supply of random bits in dev/random falls below the low water mark of the device.

More information about HAVEGE is available at http://www.irisa.fr/caps/projects/hipsor/

There are three methods to install haveged 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 haveged Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install haveged

Install haveged Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install haveged using apt by running the following command:

sudo apt -y install haveged

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

sudo aptitude -y install haveged

How To Uninstall haveged on Ubuntu 22.04

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

sudo apt-get remove haveged

Uninstall haveged And Its Dependencies

To uninstall haveged and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:

sudo apt-get -y autoremove haveged

Remove haveged Configurations and Data

To remove haveged configuration and data from Ubuntu 22.04 we can use the following command:

sudo apt-get -y purge haveged

Remove haveged configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge haveged

References

Summary

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