When working with a Linux distribution, the user may need hardware information and basic system information for the current working system. Whether you are a software developer or a regular Linux user, you may need to check your system’s software and hardware compatibility. The Linux command line system provides built-in commands with which the user can get detailed information about the current system and hardware platform.
In this article, you will find a summary of all the commands to help you easily get detailed information about your system and hardware.
We have executed these commands on CentOS 8 system, which are listed below:
Displaying Hardware Information Using CentOS 8
The following commands are used to display detailed information about the hardware of your system.:
Displaying Hardware Information Using the lshw Command
Using the lshw command, you can get all the hardware information you need from your system, such as CPU, memory, disks, etc. To get the system hardware information, run the command as superuser, which is listed below:
$ sudo lshw
In most cases, the lshw utility is already installed on your CentOS 8 system. If it is not installed, you can install it on CentOS 8 using the following command:
$ sudo yum install lshw
The above output is a detailed hardware version of my CentOS 8 system installed on a virtual box. Using the following commands, you can view complete hardware information.
Show equipment summary
To view a complete summary of the hardware profile information, use the following command:
$ lshw -short
In the output displayed above, you can see a summary of the complete equipment profile in columns that are more readable.
Get hardware information in your system HTML file
You can also use the lshw utility to print the hardware profile data to an HTML file. To do this, as a superuser, run the lshw command using the following syntax:
$ sudo lshw -html > [filename.html]
$ sudo lshw -html > hardwareinformation.html
After successfully executing the above command, an HTML file has been generated on your system in the / home / user / folder.
Displaying cpu information with lscpu
Using the lscpu utility, you can display detailed information about the processor from the sysfs and / proc / cpuinfo files. Use this command like this:
The above command will display CPU architecture, cores, CPU family model, number of CPUs, threads, caches, and more.
Lock device information
Using the lsblk utility, you can display information about storage devices connected to your system, such as hard drive, flash drives, disk partitions, etc.
Using the following command, you can view much more information about all devices in the system:
$ lsblk -a
Displaying USB Controller Information
The ‘lsusb’ command is used to display information about USB controllers and devices connected to them. Run the following command to get information about the USB controller:
Using the following command, you can view more detailed information about each USB device.
$ lsusb -v
The above output displays USB controllers and connected devices.
Displaying information about other hardware devices
You can also display information about the following devices:
- PCI devices
- SCSI devices
- SATA devices
Use the following command to display information about PCI devices:
To get information about SCSI devices, you run the following command:
To view information about SATA devices, use the following syntax:
$ hdparm [devicelocation]
For example use the command
$ hdparm /dev/sda1
After implementing all the above commands, you should be able to get any information related to your system in CentOS 8 or other Linux environments. This article will help you review the system specifications to make sure the entire software or hardware system is compatible with your needs or not.
How to get detailed information about system hardware in CentOS 8