This article was updated and rechecked on 22nd of January 2021

Category: Linux Terminal

Added: 20th of May 2018

Updated On: 22nd of January 2021

Viewed: 2,554 times

List hardware information using the terminal

lshw extracts detailed information about the hardware in your machine. It can report on your motherboard, CPU, Memory, Graphics and other hardware.

To list your hardware information, enter the following command in the terminal. You will need to enter your root password.

sudo lshw

lshw outputs a lot of information, you can shorten this by using the -short command
sudo lshw -short

Output using lshw -short command

If you want a hard copy of the information you can also export the hardware information to an .html document which can then be viewed in your web browser.

The .html document will be created on your desktop. Just remember to replace username with your own username, and file_name with your own file_name
sudo lshw -html > /home/username/Desktop/file_name.html