Command list for viewing hardware information in Linux
GuideMany commands can be used to view hardware information on Linux systems. Some commands can only print the specific hardware component information such as CPU and memory, and others can view the information of multiple hardware components.
This tutorial will show you the most common commands for viewing information about various hardware devices and configuration details.Lscpu
The lscpu command can view information about the CPU and processing unit. This command does not have any other options or functions.
lscpu
Run the command to view the following output:
LspciLspci is another command line tool that can be used to list all PCI buses and the details of the devices connected to the PCI bus, for example, VGA adapter, video card, network adapter, usb port, and SATA controller.
lspci
You can see similar output information:
You can run the following command to filter out the information of a specific device:
lspci -v | grep "VGA" -A 12
Run the preceding command to view information about the video card:
LshwLshw is a common tool that lists detailed or summary information about multiple hardware units, such as CPU, memory, usb controller, and hard disk. Lshw can extract relevant information from each "/proc" file.
lshw -short
Run the preceding command to view the following information:
LsscsiRun the following command to list information about scsi/sata devices such as hard disks and optical drives:
lsscsi
The output is similar to the following:
LsusbThe lsusb command can list detailed information about the USB controller and the devices connected to the USB controller. By default, the lsusb command prints only the summary information. You can use the-v parameter to print the details of each usb port.
lsusb
The following output is displayed:
DfThe df command can list the summary information, mount points, used and available space of different partitions.
You can add the-H parameter when using the df command.
df -H
FreeYou can use the free command to view the total number of idle and RAM resources in the system.
free -m
The following output is displayed.
HdparmThe hdparm command can be used to display information about sata devices such as hard disks.
sudo hdparm
The following output is displayed:
SummaryEach Command has a different way to obtain hardware information. You can try different methods to view specific hardware information. All the above command line tools can be used in most Linux releases and can be easily obtained and installed from the repository.
Address: http://www.linuxprobe.com/linux-list-hardware-information-command.html