There are many commands that can be used to view hardware information on a Linux system. Some commands can only print out specific hardware component information such as CPU and memory, while others may view information on a variety of hardware components. This tutorial will give you a quick look at the most common commands for viewing information and configuration details for various hardware devices. |
lscpu
The LSCPU command is able to view the CPU and processing unit information. The command does not have any other options or other features.
Lscpu
Running the command will see the following output:
Lspci
LSPCI is another command-line tool that can be used to list all PCI buses, as well as details about the devices connected to the PCI bus, such as VGA adapters, video cards, network adapters, USB ports, SATA controllers, and so on.
Lspci
You can see similar output information:
You can filter out information for a specific device by running the following command:
Lspci-v | grep "VGA"-A 12
Run the above command to see similar information about the video card:
LSHW
LSHW is a versatile tool that lists detailed or summary information about a variety of hardware units, such as CPUs, memory, USB controllers, hard drives, and more. LSHW is able to extract relevant information from various "/proc" files.
Lshw-short
You can see the following information by running the above command:
LSSCSI
You can list information such as scsi/sata devices such as hard drives and optical drives by running the following command:
Lsscsi
will get output similar to the following:
Lsusb
The LSUSB command lists the details of the USB controller and the device connected to the USB controller. By default, the LSUSB command prints only the summary information. You can print detailed information for each USB port by using the-v parameter.
Lsusb
You can see the following output
DF
The DF command lists profile information, mount points, used, and available space for different partitions.
You can add the-h parameter when you use the DF command.
Df-h
Free
Use the free command to see the total number of idle and RAM used in the system.
Free-m
You will see the output below.
Hdparm
The hdparm command can be used to display information about a SATA device such as a hard disk.
sudo hdparm
You can see the following output:
Summary
Each command has a different way to get information about the hardware. When viewing specific hardware information, you can try different ways. All of the above command-line tools are available in most Linux distributions and can be easily obtained from the repository.
Linux system View hardware information command Daquan