When working on a Linux distribution, the user may need to know about hardware and basic system information of the current working system. Regardless of whether you are a software developer or a normal Linux user, it might be necessary to check software and hardware system compatibility. The command-line Linux system provides built-in commands through which a user can get the details about the currently used system and hardware platform.
In this article, you will find a brief description of all commands, which will help you easily get details about your system and hardware.
We have run these commands on the CentOS 8 system, which are listed below:
There are the following commands which are used to display detailed information about your system hardware:
Using ‘lshw’ command, you can fetch all necessary hardware details from your system such as CPU, memory, disks, etc. To get the system’s hardware information, run the command as superuser which is given below:
$ sudo lshw
Mostly, the ‘lshw’ utility is already installed on your CentOS 8 system. If it is not installed then you can install it on CentOS 8 using the following command:
$ sudo yum install lshw
The above-shown output is a detailed version of the hardware details of my CentOS 8 system that is installed on the Virtual box. Using the following commands you can view the complete summary of hardware.
To view the complete summary of hardware profile details, use the following command:
$ lshw -short
Output:
In the above-displayed output, you can see a summary of the complete hardware profile in column-wise which is more readable.
Using ‘lshw’ utility, you can also print the hardware profile details to an HTML file. For this purpose, as a superuser run the ‘lshw’ command by using the following syntax:
$ sudo lshw -html > [filename.html]
Example:
$ sudo lshw -html > hardwareinformation.html
After successfully executing the above command, the HTML file has been created in your system at the location /home/user/ folder.
Output:
Using ‘lscpu’ utility, you can list the details information of CPU from the sysfs and /proc/cpuinfo files to your screen. Use this command as follows:
$ lscpu
Output:
The above-mentioned command will display the CPU architecture, cores, CPU family model, number of CPUs, threads, caches, and much more.
Using ‘lsblk’ utility, you can display the information about storage devices that are connected to your system such as hard drive, flash drives, drive partitions, etc.
$ lsblk
Using the following command you can view much more information about all the system’s devices:
$ lsblk -a
Output:
The ‘lsusb’ command is used to list the information about USB controllers and the devices that are connected with them. Execute the following command to get the USB controller information:
$ lsusb
Using the following command you can view the more details about each USB device.
$ lsusb -v
Output:
The above output displays the USB controllers and connected devices.
You can also display information about the following devices:
To display the information about PCI devices use the following command:
$ lspci
Output:
To get information about SCSI devices, you will run the command as follows:
$ lsscsi
Output:
To view, the information about SATA devices use the following syntax:
$ hdparm [devicelocation]
For example, use the command
$ hdparm /dev/sda1
After implementing all the above-mentioned commands, you will be able to retrieve any kind of information related to your system on CentOS 8 or other Linux environments. This article will help you to view system specifications in order to check that the entire software or hardware system is compatible with your needs or not.
Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…
ISPConfig is an open-source control panel that allows users to manage multiple servers from a…
As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…
Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…
Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…
phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…