lshw command not found

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

Introduction

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

lshw: command not found

or when using sudo you get the following error message

sudo: lshw: command not found

Solutions to lshw: command not found

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

In Ubuntu lshw is provided by lshw package.

lshw is:

A small tool to provide detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 systems, on some PowerPC machines (PowerMac G4 is known to work) and AMD64.

Information can be output in plain text, HTML or XML.

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

sudo apt-get -y install lshw

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

You can also use apt command to install lshw.

sudo apt -y install lshw

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

sudo aptitude install lshw

Summary

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