Home>Article>Operation and Maintenance> How to query hard disk information in Linux

How to query hard disk information in Linux

青灯夜游
青灯夜游 Original
2022-03-09 16:13:06 76869browse

6 ways to query hard disk information: 1. Use the "df-h" command to output the hard disk usage status in a readable format; 2. Use the "lsblk" command to list the hard disk information; 3. . Use the "lshw" command to print detailed information about the hardware (including hard disk); 4. Use the "fdisk" command to print hard disk information; 5. Use the "cat /proc/partitions" command to view the current hard disk and partitions. Some information; 6. Use the lsscsi tool to print SCSI hard disk information.

How to query hard disk information in Linux

#The operating environment of this tutorial: Red Hat Enterprise Linux 6.1 system, Dell G3 computer.

Linux query hard disk information

The firstdf-hcommand can output the hard disk usage status in a readable format : As shown in the figure

How to query hard disk information in Linux

#Second, use the "lsblk" command to list only the hard disk and not the partition information. An example is shown in the figure below

How to query hard disk information in Linux

#Third, use the "lshw" command to print detailed information about the hardware. The example is as follows

How to query hard disk information in Linux

Fourth, fdisk can be used to print hard disk information, the example is as follows:

How to query hard disk information in Linux

Fifth, You can use the contents of the /proc/partitions file to view some information about the current hard disk and partitions. As shown in the picture

How to query hard disk information in Linux

Sixth, use the lsscsi tool to print SCSI hard disk information, as shown in the picture:

How to query hard disk information in Linux

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of How to query hard disk information in Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn