Command list for viewing hardware information in Linux
Many 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
lscpu
Command to view the CPU and processing unit information. This command does not have any other options or functions.
lscpu
Run the command to view the following output:
Hdd_info_lscpu
Lspci
lspci
Is another command line tool that can be used to list all the PCI bus 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.
Hdd_info_lspci
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.
Hdd_info_lspci_vga
Lshw
lshw
Is a common tool that lists detailed or summary information about multiple hardware units, such as CPU, memory, usb controller, and hard disk.lshw
The ability to extract relevant information from each "/proc" file.
lshw -short
Run the preceding command to view the following information.
Hdd_info_lshw
Lsscsi
Run 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.
Hdd_info_lsscsi
Lsusb
lsusb
Command to list detailed information about the USB controller and the device connected to the USB controller. By default,lsusb
Command to print only the summary information. You can use the-v parameter to print the details of each usb port.
lsusb
The following output is displayed.
Hdd_info_lsusb
Inxi
Inxi
It is a bash script that can obtain hardware information from multiple sources and commands of the system, and print a friendly report that non-technical personnel can understand.
By default, Ubuntu is not installed.inxi
. You can run the following command to installInxi
:
sudoapt-get install inxi
After installationInxi
Then, run the following command to obtain the hardware information:
inxi -Fx
Similar output can be obtained.
Hdd_info_inxi
Df
df
Command to list the summary, mount points, used and available space of different partitions.
You can usedf
Add-H
Parameters.
df-H
The following output is displayed.
Hdd_info_df
Free
Usefree
Command to view the total number of idle and RAM resources used in the system.
free -m
The following output is displayed.
Hdd_info_free
Dmidecode
dmidecode
Commands are different from other commands. This command reads information from the DMI table in the hardware.
To view the processor information, run the following command:
sudo dmidecode -t processor
Hdd_info_dmi_processor
To view the memory information, run the following command:
sudo dmidecode -t memory
Hdd_info_dmi_memory
To view the bios information, run the following command:
sudo dmidecode -t bios
Hdd_info_dmi_bios
Hdparm
hdparm
Command can be used to display information about sata devices such as hard disks.
sudohdparm
The following output is displayed.
Hdd_info_hdparm
Summary
Each 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.
Via: https://www.maketecheasier.com/check-hardware-information-linux/
Author: Hitesh Jethva Translator: sonofelice Proofreader: wxy
This article was originally compiled by LCTT and launched with the honor of Linux in China
This article permanently updates the link address: