generate_randfile command not found

In this troubleshooting guide we learn how to fix generate_randfile command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

generate_randfile: command not found

or when using sudo you get the following error message

sudo: generate_randfile: command not found

Solutions to generate_randfile: command not found

How To Fix generate_randfile: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu generate_randfile is provided by bonnie++ package.

bonnie++ is:

Based on the old Bonnie benchmark, Bonnie++ is a toolkit for testing hard drive and file system performance.

As well as bonnie++ itself and some output filters, the suite provides some other benchmarking tools including zcav, which can compare the raw-read performance of different zones on a drive, and gives output suitable for gnuplot.

To fix this problem, we can install more using the command below.

sudo apt-get -y install bonnie++

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install bonnie++.

sudo apt -y install bonnie++

Or if you have aptitude installed you can use the following command.

sudo aptitude install bonnie++

Summary

In this tutorial we learn how to fix generate_randfile command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.