How to View Hardware Information in Linux

Being a Linux enthusiast implies that you are familiar with both the hardware and software entities of your system. Since it is the hardware that hosts the Linux operating system software, understanding the underlying hardware specs will help you achieve several objectives:

  • You will know the Main Memory (RAM) allocation on your system and how much is usable. This information is important especially when you want to upgrade/change your Linux OS.
  • You can quickly take note of available storage space and storage capacity on your Linux system in case you need to store more data, especially on a Linux server environment.
  • You will be able to determine the performance status of critical hardware components that define your computer/machine.

The Linux operating system has a reputation of making life easier for users that want to achieve critical OS objectives like viewing the hardware information of their machine. Moreover, you do not need to install any third-party application package/software.

The commands associated with the display of your Linux hardware information cover CPU info, Memory info, and other hardware peripherals and devices info.

This article guide is going to highlight some of these commands and their usage.

1. Lscpu Command – Show Linux CPU Information

If you are interested in the CPU and Processing Unit hardware information of your machine/computer, consider the reputation of this Linux command. Its usage is straightforward as demonstrated below:

$ lscpu 
View Linux CPU Information
View Linux CPU Information

2. Lshw Command – Show Linux Hardware Information

The output of the lshw command is not limited to CPU and Processing Unit hardware information. It also reveals essential hardware information related to hardware units like Network Adapters, Memory, USB Controllers, and Disk.

Running the lshw command as a super-user (Sudoer user) produces a more accurate output.

$ sudo lshw 

The lshw command’s output reveals your computer’s general info like vendor, product, and serial; the computer’s core, CPU, memory, network, and USB info.

View Linux Hardware Information
View Linux Hardware Information

3. Lspci Command – Show Linux PCI Information

The lspci command has a dedicated functionality in detailing and briefing a machine’s PCI Buses hardware info together with the details of other connected hardware components.

Run lspci if you also need hardware info related to SATA Controllers, Network Adapters, USB Ports, Graphics Card, and VGA Adapter.

$ lspci
View Linux PCI Information
View Linux PCI Information

4. Lsusb Command – Show Linux USB Devices Information

The lsusb command suites a Linux user interested in hardware information associated with their machine’s USB controllers. It also reveals detailed information on hardware devices linked to the USB controllers.

$ lsusb
View Linux USB Controllers Information
View Linux USB Controllers Information

A more detailed output can be achieved by using the "-v" option alongside lsusb command.

$ lsusb -v

5. Lsblk Command – Show Linux Block Devices Information

If you need hardware information on connected block devices like flash drives, optical drives, and internal hard drive partitions, you will appreciate what the lsblk command has to offer.

$ lsblk 
View Linux Block Device Information
View Linux Block Device Information

6. Df Command – Show Linux Disk Usage Information

The df command details the filesystem partitions hardware info like available space, used space, and mount points.

$ df -H
View Linux Disk Space Information
View Linux Disk Space Information

[ You might also like: How to Find the Total Size of a Directory in Linux ]

7. Free Command – Show Linux Memory Information

The free command reveals important hardware info about the machine’s Swap and Main Memory.

$ free -m
View Linux Memory Information
View Linux Memory Information

[ You might also like: How to Find Top Running Processes by Memory Usage ]

8. Mount Command – Show Linux Mounted File System Information

The mount command reveals mounted file systems in Linux.

$ mount | column -t
View Linux Mounted Filesystem Information
View Linux Mounted Filesystem Information

9. Fdisk Command – Show Linux Partitions Information

The fdisk command is prominent for detailing active hardware partition information of your Linux system. You however need to run the fdisk command as a Sudoer/root user.

$ sudo fdisk -l
View Linux Partition Information
View Linux Partition Information

The hardware commands discussed in this article should be able to get you any hardware information regarding your Linux-powered computer/machine.

Got something to say? Join the discussion.