Several commands for viewing hard disk information in Linux

Viewing server hard disk information is one of the daily tasks of system administrators. This article will introduce the commands commonly used in work to view Linux hard disk information.

Lshw command
The lshw command can provide a lot of information about system hardware, while using the - C disk option allows you to view related information such as description, (device) logical name, size, etc
[ root@10 ~]# lshw -C disk
*-disk
description: ATA Disk
product: SAMSUNG MZ7WD480
vendor: Western Digital
physical id: 0.0.0
bus info: scsi@0 : 0.0.0
logical name: /dev/sda
version: 103Q
serial: S2G1NYAG305472
size: 447GiB (480GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=5 guid=e32f30e4-5b72-4318-8181-aa60e0eef84a logicalsectorsize=512 sectorsize=512

Lsblk command
The lsblk command can list all block devices in a tree, and it collects information about the hard disk by referencing the udev database and sysfs file system
[ root@10 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 447.1G 0 disk
├─sda4 8:4 0 430.5G 0 part /
├─sda2 8:2 0 1000M 0 part /boot
├─sda3 8:3 0 15.7G 0 part [SWAP]
└─sda1 8:1 0 1M 0 part

  • Linux, Linux 查看硬盘
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to change the root user password of Linux operating system

Changing the root user password of the Linux operating system is a critical operation, please...

Can websites not use SSL certificates? There may be issues with websites not installing SSL certificates

Website security certificate, also known as website SSL certificate. Nowadays, we see many...

Several of the most common encryption and decryption methods

Encryption and decryption are the most commonly used data conversion methods in communication....

Method for modifying server hostname in Linux system

How to modify the hostname in LinuxHow to modify the Linux hostname? You can temporarily modify...

Call WordPress to customize the content of article categories

If we have a custom WordPress article classification, how can we operate it separately if...