ohai command not found

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

Introduction

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

ohai: command not found

or when using sudo you get the following error message

sudo: ohai: command not found

Solutions to ohai: command not found

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

In Ubuntu ohai is provided by ohai package.

ohai is:

Information about your system is collected and returned as multidimensional attributes in JSON format. The following information is captured:

  • Operating system and kernel
  • Filesystems in use
  • Network configuration and statistics
  • Available languages
  • Virtualization

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

sudo apt-get -y install ohai

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

You can also use apt command to install ohai.

sudo apt -y install ohai

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

sudo aptitude install ohai

Summary

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