lstopo command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
lstopo: command not found
or when using sudo you get the following error message
sudo: lstopo: command not found
Solutions to lstopo: command not found
How To Fix lstopo: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu lstopo is provided by hwloc package.
hwloc is:
Hardware Locality (hwloc) provides a portable abstraction (across OS, versions, architectures, …) of the hierarchical topology of modern architectures. It primarily aims at helping high-performance computing applications with gathering information about the hardware so as to exploit it accordingly and efficiently.
hwloc provides a hierarchical view of the machine, NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various attributes such as cache and memory information.
hwloc supports old kernels not having sysfs topology information, with knowledge of cpusets, offline cpus, and Kerrighed support
This package contains utilities to show the topology of the machine (lstopo and hwloc-ls), manipulate cpu masks (hwloc-calc), and bind processes (hwloc-bind).
To fix this problem, we can install more using the command below.
sudo apt-get -y install hwloc
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install hwloc.
sudo apt -y install hwloc
Or if you have aptitude installed you can use the following command.
sudo aptitude install hwloc
Summary
In this tutorial we learn how to fix lstopo command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.